mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 15:04:24 +03:00
Improve class parser (#289)
- accept `class P { async = 1 }}` - accept `class P { static = 1 }}` etc. - Fixes #261
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user