mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
15 lines
249 B
Text
15 lines
249 B
Text
|
|
||
|
fun autoGetIntOrNull() {
|
||
|
if (random()) { return 1; }
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
fun testAutoInferredIntOrNull() {
|
||
|
var b: builder = autoGetIntOrNull() as builder;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
@compilation_should_fail
|
||
|
@stderr type `int?` can not be cast to `builder`
|
||
|
*/
|