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-6.tolk

17 lines
279 B
Text
Raw Normal View History

const op_increase = 0x123;
fun inc(mutate x: int): int {
x += 10;
return x + 1;
}
fun cantCallMutatingFunctionWithImmutable() {
return inc(mutate op_increase);
}
/**
@compilation_should_fail
@stderr modifying immutable constant
@stderr inc(mutate op_increase)
*/