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

16 lines
281 B
Text
Raw Permalink Normal View History

fun incBoth(mutate x: int, mutate y: int) {
x += 10;
y += 10;
}
fun cantCallMutatingFunctionWithRvalue() {
var x = 10;
incBoth(mutate x, mutate 30);
}
/**
@compilation_should_fail
@stderr literal can not be used as lvalue
@stderr incBoth(mutate x, mutate 30)
*/