1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-13 03:32:22 +00:00
ton/tolk-tester/tests/invalid-typing-9.tolk

14 lines
267 B
Text
Raw Normal View History

fun getTupleLastGetter<X>(): tuple -> X {
return tupleLast<X>;
}
fun failTypeMismatch() {
var t = createEmptyTuple();
var c: cell = getTupleLastGetter<int>()(t);
}
/**
@compilation_should_fail
@stderr can not assign `int` to variable of type `cell`
*/