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-typing-26.tolk

13 lines
280 B
Text
Raw Permalink Normal View History

2025-02-11 18:52:01 +00:00
fun getNullableInt(): int? { return 5; }
fun testAssertThrowIsConditional() {
var (x, y) = (getNullableInt(), getNullableInt());
assert(x != null) throw(y = 10);
return x + y;
}
/**
@compilation_should_fail
@stderr can not apply operator `+` to `int` and `int?`
*/