| Index: pkg/front_end/lib/src/fasta/parser/parser.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
|
| index e2083093cd49b0be62fa52fe6a554097d106a296..6f5aea713804530b6f381faae1e712561b70550d 100644
|
| --- a/pkg/front_end/lib/src/fasta/parser/parser.dart
|
| +++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
|
| @@ -887,6 +887,13 @@ class Parser {
|
| if (!token.isIdentifier()) {
|
| token =
|
| reportUnrecoverableError(token, ErrorKind.ExpectedIdentifier)?.next;
|
| + } else if (token.isBuiltInIdentifier &&
|
| + !context.isBuiltInIdentifierAllowed) {
|
| + if (context.inDeclaration) {
|
| + reportRecoverableError(token, ErrorKind.BuiltInIdentifierInDeclaration);
|
| + } else if (!optional("dynamic", token)) {
|
| + reportRecoverableError(token, ErrorKind.BuiltInIdentifierAsType);
|
| + }
|
| }
|
| listener.handleIdentifier(token, context);
|
| return token.next;
|
|
|