Improve class parser (#289)

- accept `class P { async = 1 }}`
- accept `class P { static = 1 }}` etc.
- Fixes #261
This commit is contained in:
Charlie Gordon
2024-05-05 19:54:47 +02:00
committed by GitHub
parent d9c699f528
commit 0c8fecab23
2 changed files with 13 additions and 5 deletions

View File

@@ -335,11 +335,13 @@ function test_class()
assert(S.x === 42);
assert(S.y === 42);
assert(S.z === 42);
class P {
get = () => "123"
get = () => "123";
static() { return 42; }
}
assert(new P().get() === "123");
assert(new P().static() === 42);
};
function test_template()