Commit 9a8c0119 authored by adamk's avatar adamk Committed by Commit bot

Properly handle parsing a '%'-prefixed runtime call as a binding pattern

R=rossberg@chromium.org
BUG=chromium:552302
LOG=n

Review URL: https://codereview.chromium.org/1425723004

Cr-Commit-Position: refs/heads/master@{#31890}
parent cdc1fe5c
......@@ -2404,6 +2404,7 @@ ParserBase<Traits>::ParsePrimaryExpression(ExpressionClassifier* classifier,
case Token::MOD:
if (allow_natives() || extension_ != NULL) {
BindingPatternUnexpectedToken(classifier);
return this->ParseV8Intrinsic(ok);
}
break;
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --harmony-destructuring --allow-natives-syntax
assertThrows('var %OptimizeFunctionOnNextCall()', SyntaxError);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment