Bug description
// bad.ts
class A {
s: string;
@inline
constructor() {
this.s = "";
let copy = this.s;
}
}
export function main(): void {
new A();
}
Steps to reproduce
> node ~/fuzz_emerging_compilers/AssemblyScript/assemblyscript/bin/asc --optimizeLevel 2 --shrinkLevel 2 bad.ts -o bad.wasm
ERROR TS2564: Property 'bad/A#s' has no initializer and is not assigned in the constructor before 'this' is used or returned.
:
2 │ s: string;
│ ~
└─ in bad.ts(2,3)
:
7 │ let copy = this.s;
│ ~~~~~~
└─ in bad.ts(7,16)
FAILURE 1 compile error(s)
AssemblyScript version
b6bda05
Bug description
Steps to reproduce
AssemblyScript version
b6bda05