Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index 4b526f5f1f3c6f039ae730c70b07eccfa8a20444..33d87da6fb2128b4ad56e2bad445cd875d8d4df5 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -2445,6 +2445,7 @@ ParserBase<Traits>::ParseBinaryExpression(int prec, bool accept_IN, bool* ok) { |
// prec1 >= 4 |
while (Precedence(peek(), accept_IN) == prec1) { |
Token::Value op = Next(); |
+ Scanner::Location op_location = scanner()->location(); |
int pos = position(); |
ExpressionT y = ParseBinaryExpression(prec1 + 1, accept_IN, CHECK_OK); |
@@ -2464,6 +2465,11 @@ ParserBase<Traits>::ParseBinaryExpression(int prec, bool accept_IN, bool* ok) { |
case Token::NE_STRICT: cmp = Token::EQ_STRICT; break; |
default: break; |
} |
+ if (cmp == Token::EQ && is_strong(language_mode())) { |
+ ReportMessageAt(op_location, "strong_equal"); |
+ *ok = false; |
+ return this->EmptyExpression(); |
+ } |
x = factory()->NewCompareOperation(cmp, x, y, pos); |
if (cmp != op) { |
// The comparison was negated - add a NOT. |