mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
Add failing input
This commit is contained in:
20
inputs/failing/exceptions/snapshotThis.ts
Normal file
20
inputs/failing/exceptions/snapshotThis.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
// test_output! 1
|
||||
// (Should be 0.)
|
||||
|
||||
export default function main() {
|
||||
const foo = new Foo();
|
||||
foo.inc();
|
||||
|
||||
return foo.x;
|
||||
}
|
||||
|
||||
class Foo {
|
||||
x = 0;
|
||||
|
||||
inc() {
|
||||
try {
|
||||
this.x++;
|
||||
throw new Error("boom");
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user