Files
ValueScript/inputs/passing/exceptions/snapshotThis.ts
2023-07-21 16:52:40 +10:00

20 lines
219 B
TypeScript

//! test_output(0)
export default function main() {
let foo = new Foo();
foo.inc();
return foo.x;
}
class Foo {
x = 0;
inc() {
try {
this.x++;
throw new Error("boom");
} catch {}
}
}