mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
12 lines
272 B
Text
12 lines
272 B
Text
|
fun calcSum<X>(x: X, y: X) { return x + y; }
|
||
|
|
||
|
fun cantApplyPlusOnNullable() {
|
||
|
return calcSum(((0 as int?)), null);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
@compilation_should_fail
|
||
|
@stderr while instantiating generic function `calcSum<int?>`
|
||
|
@stderr can not apply operator `+` to `int?` and `int?`
|
||
|
*/
|