Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20889,7 +20889,7 @@ static int __exception js_parse_property_name(JSParseState *s,
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=') {
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
Expand All @@ -20906,7 +20906,7 @@ static int __exception js_parse_property_name(JSParseState *s,
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=') {
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
Expand Down
7 changes: 7 additions & 0 deletions tests/test_language.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,17 @@ function test_class()
assert(S.z === 42);

class P {
get;
set;
async;
get = () => "123";
set = () => "456";
async = () => "789";
static() { return 42; }
}
assert(new P().get() === "123");
assert(new P().set() === "456");
assert(new P().async() === "789");
assert(new P().static() === 42);
};

Expand Down