1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-15 04:32:21 +00:00
ton/tolk-tester/tests/invalid-generics-13.tolk
2025-02-11 22:52:01 +04:00

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?`
*/