mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-13 07:28:03 -05:00
17 lines
237 B
TypeScript
17 lines
237 B
TypeScript
// test_output! E: TypeError{"message":"Cannot mutate this because it is const"}
|
|
|
|
export default function () {
|
|
const foo = new Foo();
|
|
foo.inc(); // Should throw
|
|
|
|
return foo.x;
|
|
}
|
|
|
|
class Foo {
|
|
x = 0;
|
|
|
|
inc() {
|
|
this.x++;
|
|
}
|
|
}
|