1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 19:22:37 +00:00
ton/tolk-tester/tests/invalid-mutate-4.tolk

15 lines
200 B
Text
Raw Permalink Normal View History

fun inc(mutate x: int) {
x += 1;
}
fun cantPassToMutatingFunction() {
val myVal = 10;
inc(mutate myVal);
}
/**
@compilation_should_fail
@stderr modifying immutable variable `myVal`
*/