| Index: compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| index 8f9cfc073c9092218ec737af748ef623822d71a5..e8dc6a33b711e7c8ade636b7bb88a62ed7c21c5d 100644
|
| --- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| +++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
|
| @@ -3117,7 +3117,7 @@ public class DartParser extends CompletionHooksParserBase {
|
| constructor = doneWithoutConsuming(toPrefixedType(parts));
|
| } else {
|
| // Named constructor.
|
| - DartIdentifier identifier = ensureIdentifier(part2);
|
| + DartIdentifier identifier = (DartIdentifier)part2.getIdentifier();
|
| constructor = doneWithoutConsuming(new DartPropertyAccess(doneWithoutConsuming(part1),
|
| identifier));
|
| }
|
| @@ -3129,7 +3129,7 @@ public class DartParser extends CompletionHooksParserBase {
|
| reportError(parts.get(3), ParserErrorCode.EXPECTED_LEFT_PAREN);
|
| }
|
| DartTypeNode typeNode = doneWithoutConsuming(toPrefixedType(parts));
|
| - DartIdentifier identifier = ensureIdentifier(parts.get(2));
|
| + DartIdentifier identifier = (DartIdentifier)parts.get(2).getIdentifier();
|
| constructor = doneWithoutConsuming(new DartPropertyAccess(typeNode, identifier));
|
| break;
|
| }
|
| @@ -3144,16 +3144,8 @@ public class DartParser extends CompletionHooksParserBase {
|
| }
|
| }
|
|
|
| - private DartIdentifier ensureIdentifier(DartTypeNode node) {
|
| - List<DartTypeNode> typeArguments = node.getTypeArguments();
|
| - if (!typeArguments.isEmpty()) {
|
| - reportError(typeArguments.get(0), ParserErrorCode.UNEXPECTED_TYPE_ARGUMENT);
|
| - }
|
| - return (DartIdentifier) node.getIdentifier();
|
| - }
|
| -
|
| private DartTypeNode toPrefixedType(List<DartTypeNode> parts) {
|
| - DartIdentifier part1 = ensureIdentifier(parts.get(0));
|
| + DartIdentifier part1 = (DartIdentifier)parts.get(0).getIdentifier();
|
| DartTypeNode part2 = parts.get(1);
|
| DartIdentifier identifier = (DartIdentifier) part2.getIdentifier();
|
| DartPropertyAccess access = doneWithoutConsuming(new DartPropertyAccess(part1, identifier));
|
|
|