Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 78f6a269f024a1a10d6a940102f937f748f8e8d1..b34b04e15252ee30774e2f6ebfd339f88fd646a0 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -2027,6 +2027,12 @@ typename ParserBase<Traits>::ObjectLiteralPropertyT ParserBase< |
CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); |
return factory()->NewObjectLiteralProperty(is_get, value, next_pos, |
is_static); |
+ |
+ } else if (!in_class && allow_harmony_object_literals_ && |
+ Token::IsIdentifier(name_token, strict_mode(), |
+ this->is_generator())) { |
+ value = this->ExpressionFromIdentifier(name, next_pos, scope_, factory()); |
+ |
} else { |
Token::Value next = Next(); |
ReportUnexpectedToken(next); |