Closed
Description
Bug description
class T {
v: i32 = 0;
}
function f1(a: i32, t: T, b: i32): void {
trace("f1", 1, t.v);
}
function f2(t: T): i32 {
__collect(); // gc will recover the second argument T in f1
let c = new T();
c.v = 100;
return 1;
}
export function _start(): void {
f1(1, new T(), f2(new T()));
}
This code will output f1 100 instead of f1 0
Steps to reproduce
run those code
AssemblyScript version
0.25.2 - 0.27