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-21.tolk
2025-02-11 22:52:01 +04:00

14 lines
274 B
Text

fun getNullableInt(): int? { return 5; }
fun testNeverTypeOccurs() {
var x: int? = getNullableInt();
if (x == null && x != null) {
return x + 0;
}
return 0;
}
/**
@compilation_should_fail
@stderr can not apply operator `+` to `never` and `int`
*/