Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 11316096: Issue 6283. Support type literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index dcb4704159f488b2b7575580416eb0aebffd455a..a50bcebfc078fc4163c64162fb8563bf01eb46b5 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -1343,19 +1343,9 @@ public class Resolver {
return typeProvider.getTypeType().getElement();
}
break;
+ case FUNCTION_TYPE_ALIAS:
case TYPE_VARIABLE:
- // Type variables are not legal in identifier expressions, but the type variable
- // may be hiding a class element.
- LibraryElement libraryElement = scope.getLibrary();
- Scope libraryScope = libraryElement.getScope();
- // dip again at the library level.
- element = libraryScope.findElement(libraryElement, name);
- if (element == null) {
- onError(x, ResolverErrorCode.TYPE_VARIABLE_NOT_ALLOWED_IN_IDENTIFIER);
- } else {
- return checkResolvedIdentifier(x, isQualifier, libraryScope, name, element);
- }
- break;
+ return typeProvider.getTypeType().getElement();
default:
break;
}
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698