Commit dc70cb66 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Only throw spread class property error if it's the first error

Bug: chromium:899474, v8:8363, v8:7926
Change-Id: I89680d35ab2557f5a2b2282813362f5f654862a9
Reviewed-on: https://chromium-review.googlesource.com/c/1304314
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57058}
parent bfe134a7
......@@ -2306,6 +2306,7 @@ ParserBase<Impl>::ParseClassPropertyDefinition(
return result;
}
case ParsePropertyKind::kSpread:
RETURN_IF_PARSE_ERROR_CUSTOM(NullLiteralProperty);
ReportUnexpectedTokenAt(
Scanner::Location(name_token_position, name_expression->position()),
name_token);
......
// 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("class A {...", 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