Commit 0b480310 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Don't rewrite parameters if has_error()

Bug: chromium:908250
Change-Id: I414255f00bf7dcec0cf8b35e314a2b9b78a9116e
Reviewed-on: https://chromium-review.googlesource.com/c/1350117
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57813}
parent 2d3a893a
......@@ -2803,6 +2803,7 @@ class InitializerRewriter final
};
void Parser::RewriteParameterInitializer(Expression* expr) {
if (has_error()) return;
InitializerRewriter rewriter(stack_limit_, expr, this);
rewriter.Run();
}
......
// Copyright 2018 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.
assertThrows("(al,al,e={}=e)=>l", 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