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

18 lines
303 B
Text
Raw Normal View History

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
2025-02-11 18:52:01 +00:00
@stderr in function `bar<slice>`
@stderr can not convert type `int` to return type `slice`
@stderr return 1
*/