mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
14 lines
353 B
Text
14 lines
353 B
Text
fun getNullableInt(): int? { return 5; }
|
|
|
|
fun testTryBodyDontSmartCast() {
|
|
var x = getNullableInt();
|
|
try {
|
|
x = 5;
|
|
} catch {}
|
|
return x * 10; // x is not int here; for now, we have no exception edges, assuming it can be anywhere inside try
|
|
}
|
|
|
|
/**
|
|
@compilation_should_fail
|
|
@stderr can not apply operator `*` to `int?` and `int`
|
|
*/
|