Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index e6f93f4a19b1b1a4d0f681398bdd9d15a2669a02..b8f3d2a33a2f1f360846665e3cd91f9eabe9cec2 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -3321,6 +3321,11 @@ ParserBase<Impl>::ParseMemberWithNewPrefixesExpression(bool* is_async, |
if (peek() == Token::SUPER) { |
const bool is_new = true; |
result = ParseSuperExpression(is_new, CHECK_OK); |
+ } else if (allow_harmony_dynamic_import() && peek() == Token::IMPORT) { |
+ impl()->ReportMessageAt(scanner()->peek_location(), |
+ MessageTemplate::kImportCallNotNewExpression); |
+ *ok = false; |
+ return impl()->EmptyExpression(); |
} else if (peek() == Token::PERIOD) { |
return ParseNewTargetExpression(CHECK_OK); |
} else { |