| Problems reported: |
| |
| parser/error_recovery/issue_45251_new:3:39: A map literal can't be prefixed by 'new Map'. |
| final Map<String, Undefined> foo1 = new Map<String, List<int>>{}; |
| ^^^^^^^ |
| |
| parser/error_recovery/issue_45251_new:6:39: A literal can't be prefixed by 'new'. |
| final Map<String, Undefined> foo2 = new <String, List<int>>{}; |
| ^^^ |
| |
| parser/error_recovery/issue_45251_new:9:39: A map literal can't be prefixed by 'new Map'. |
| final Map<String, Undefined> foo3 = new Map{}; |
| ^^^^^^^ |
| |
| parser/error_recovery/issue_45251_new:18:39: A map literal can't be prefixed by 'new Map'. |
| final Map<String, Undefined> foo6 = new Map<String, List<int>>{"a": null}; |
| ^^^^^^^ |
| |
| parser/error_recovery/issue_45251_new:21:39: A map literal can't be prefixed by 'new Map'. |
| final Map<String, Undefined> foo7 = new Map{"a": null}; |
| ^^^^^^^ |
| |
| parser/error_recovery/issue_45251_new:24:39: A literal can't be prefixed by 'new'. |
| final Map<String, Undefined> foo8 = new <String, List<int>>{"a": null}; |
| ^^^ |
| |
| parser/error_recovery/issue_45251_new:27:39: A literal can't be prefixed by 'new'. |
| final Map<String, Undefined> foo9 = new {"a": null}; |
| ^^^ |
| |
| beginCompilationUnit(class) |
| beginMetadataStar(class) |
| endMetadataStar(0) |
| beginClassOrMixinOrNamedMixinApplicationPrelude(class) |
| handleIdentifier(F, classOrMixinDeclaration) |
| handleNoTypeVariables({) |
| beginClassDeclaration(class, null, null, null, F) |
| handleNoType(F) |
| handleClassExtends(null, 1) |
| handleClassNoWithClause() |
| handleImplements(null, 0) |
| handleClassHeader(class, class, null) |
| beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {) |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, {) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo1, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(Message[LiteralWithClassAndNew, A map literal can't be prefixed by 'new Map'., Try removing 'new' and 'Map', {string: map, lexeme: Map}], new, Map) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(List, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(int, typeReference) |
| handleNoTypeArguments(>) |
| handleType(int, null) |
| endTypeArguments(1, <, >) |
| handleType(List, null) |
| endTypeArguments(2, <, >) |
| handleLiteralSetOrMap(0, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo2, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(LiteralWithNew, new, new) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(List, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(int, typeReference) |
| handleNoTypeArguments(>) |
| handleType(int, null) |
| endTypeArguments(1, <, >) |
| handleType(List, null) |
| endTypeArguments(2, <, >) |
| handleLiteralSetOrMap(0, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo3, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(Message[LiteralWithClassAndNew, A map literal can't be prefixed by 'new Map'., Try removing 'new' and 'Map', {string: map, lexeme: Map}], new, Map) |
| handleNoTypeArguments({) |
| handleLiteralSetOrMap(0, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo4, fieldDeclaration) |
| beginFieldInitializer(=) |
| beginNewExpression(new) |
| handleIdentifier(Map, constructorReference) |
| beginConstructorReference(Map) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(List, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(int, typeReference) |
| handleNoTypeArguments(>) |
| handleType(int, null) |
| endTypeArguments(1, <, >) |
| handleType(List, null) |
| endTypeArguments(2, <, >) |
| handleNoConstructorReferenceContinuationAfterTypeArguments(() |
| endConstructorReference(Map, null, (, ConstructorReferenceContext.New) |
| beginArguments(() |
| endArguments(0, (, )) |
| endNewExpression(new) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo5, fieldDeclaration) |
| beginFieldInitializer(=) |
| beginNewExpression(new) |
| handleIdentifier(Map, constructorReference) |
| beginConstructorReference(Map) |
| handleNoTypeArguments(() |
| handleNoConstructorReferenceContinuationAfterTypeArguments(() |
| endConstructorReference(Map, null, (, ConstructorReferenceContext.New) |
| beginArguments(() |
| endArguments(0, (, )) |
| endNewExpression(new) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo6, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(Message[LiteralWithClassAndNew, A map literal can't be prefixed by 'new Map'., Try removing 'new' and 'Map', {string: map, lexeme: Map}], new, Map) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(List, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(int, typeReference) |
| handleNoTypeArguments(>) |
| handleType(int, null) |
| endTypeArguments(1, <, >) |
| handleType(List, null) |
| endTypeArguments(2, <, >) |
| beginLiteralString("a") |
| endLiteralString(0, :) |
| handleLiteralNull(null) |
| handleLiteralMapEntry(:, }) |
| handleLiteralSetOrMap(1, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo7, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(Message[LiteralWithClassAndNew, A map literal can't be prefixed by 'new Map'., Try removing 'new' and 'Map', {string: map, lexeme: Map}], new, Map) |
| handleNoTypeArguments({) |
| beginLiteralString("a") |
| endLiteralString(0, :) |
| handleLiteralNull(null) |
| handleLiteralMapEntry(:, }) |
| handleLiteralSetOrMap(1, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo8, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(LiteralWithNew, new, new) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(List, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(int, typeReference) |
| handleNoTypeArguments(>) |
| handleType(int, null) |
| endTypeArguments(1, <, >) |
| handleType(List, null) |
| endTypeArguments(2, <, >) |
| beginLiteralString("a") |
| endLiteralString(0, :) |
| handleLiteralNull(null) |
| handleLiteralMapEntry(:, }) |
| handleLiteralSetOrMap(1, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| beginMetadataStar(final) |
| endMetadataStar(0) |
| beginMember() |
| beginFields(DeclarationKind.Class, null, null, null, null, null, final, ;) |
| handleIdentifier(Map, typeReference) |
| beginTypeArguments(<) |
| handleIdentifier(String, typeReference) |
| handleNoTypeArguments(,) |
| handleType(String, null) |
| handleIdentifier(Undefined, typeReference) |
| handleNoTypeArguments(>) |
| handleType(Undefined, null) |
| endTypeArguments(2, <, >) |
| handleType(Map, null) |
| handleIdentifier(foo9, fieldDeclaration) |
| beginFieldInitializer(=) |
| handleRecoverableError(LiteralWithNew, new, new) |
| handleNoTypeArguments({) |
| beginLiteralString("a") |
| endLiteralString(0, :) |
| handleLiteralNull(null) |
| handleLiteralMapEntry(:, }) |
| handleLiteralSetOrMap(1, {, null, }, false) |
| endFieldInitializer(=, ;) |
| endClassFields(null, null, null, null, null, final, 1, final, ;) |
| endMember() |
| endClassOrMixinOrExtensionBody(DeclarationKind.Class, 9, {, }) |
| endClassDeclaration(class, }) |
| endTopLevelDeclaration() |
| endCompilationUnit(1, ) |