Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 4f710fb65a7301543da44fa206300506d9afd255..9f2b13212c6526f7d130502e0d08a315177671fb 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -2655,7 +2655,9 @@ ParserBase<Traits>::ParsePropertyDefinition( |
// static MethodDefinition |
return ParsePropertyDefinition(checker, true, has_extends, true, |
is_computed_name, nullptr, classifier, ok); |
- } else if (is_get || is_set) { |
+ } else if ((is_get || is_set) && |
+ (in_class || (peek() != Token::RBRACE && peek() != Token::COMMA && |
+ peek() != Token::ASSIGN))) { |
// Accessor |
name = this->EmptyIdentifier(); |
bool dont_care = false; |