gux/tests/mem.gux

15 lines
139 B
Plaintext

fun incr(var n: ^int) {
n = n + 1;
n = n * 2;
}
var a : ^int = new 43;
assert a == 43;
incr(a);
a = a + 1;
assert a == 89;
free a;