mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
15 lines
207 B
Text
15 lines
207 B
Text
|
fun add1(x: int) {
|
||
|
return x + 1;
|
||
|
}
|
||
|
|
||
|
fun main() {
|
||
|
val adder_fn = add1;
|
||
|
var x = 10;
|
||
|
return adder_fn(mutate x);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
@compilation_should_fail
|
||
|
@stderr `mutate` used for non-mutate argument
|
||
|
*/
|