[torque] Only allow basic type expressions in class extends clause
Bug: v8:7793 Change-Id: If419ec5659e98ebeba454417d097a7981ac3da65 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1596729 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#61238}
This commit is contained in:
parent
f534c933d9
commit
748a146924
@ -578,6 +578,9 @@ base::Optional<ParseResult> MakeClassDeclaration(
|
||||
NamingConventionError("Type", name->value, "UpperCamelCase");
|
||||
}
|
||||
auto extends = child_results->NextAs<base::Optional<TypeExpression*>>();
|
||||
if (extends && !BasicTypeExpression::DynamicCast(*extends)) {
|
||||
ReportError("Expected type name in extends clause.");
|
||||
}
|
||||
auto generates = child_results->NextAs<base::Optional<std::string>>();
|
||||
auto methods = child_results->NextAs<std::vector<Declaration*>>();
|
||||
auto fields = child_results->NextAs<std::vector<ClassFieldExpression>>();
|
||||
|
Loading…
Reference in New Issue
Block a user