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