mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-13 03:32:22 +00:00
16 lines
265 B
Text
16 lines
265 B
Text
|
fun main(x: int): int {
|
||
|
if (x > 0) {
|
||
|
return 1;
|
||
|
}
|
||
|
// 'elseif' doesn't exist anymore, it's treated as 'someFunction(arg)'
|
||
|
elseif(x < 0) {
|
||
|
return -1;
|
||
|
}
|
||
|
return x;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
@compilation_should_fail
|
||
|
@stderr expected `;`, got `{`
|
||
|
*/
|