1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-15 04:32:21 +00:00
ton/tolk-tester/tests/invalid-generics-7.tolk
2025-02-11 22:52:01 +04:00

17 lines
303 B
Text

fun failOnInstantiation(a: slice) {
var b: slice = foo(a);
}
fun bar<X>(value: X) : X {
return 1;
}
fun foo<X>(value: X) : X {
return bar(value);
}
/**
@compilation_should_fail
@stderr in function `bar<slice>`
@stderr can not convert type `int` to return type `slice`
@stderr return 1
*/