mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
15 lines
317 B
Text
15 lines
317 B
Text
fun getNullableInt(): int? { return 5; }
|
|
|
|
fun testReassignInRedef() {
|
|
var t1: int? = getNullableInt();
|
|
if (t1 != null) {
|
|
var (t1 redef, t2) = (getNullableInt(), 5);
|
|
return t1 + t2;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/**
|
|
@compilation_should_fail
|
|
@stderr can not apply operator `+` to `int?` and `int`
|
|
*/
|