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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 12598003: Support type variables as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 5985ca83ee78b8e2008806658c3472aaacd6f20b..ff28e3e00bd31e6483c6c58b8655d670728cd320 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2182,6 +2182,10 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
warnAndCreateErroneousElement(node.selector, field.name,
MessageKind.CANNOT_RESOLVE_GETTER);
}
+ } else if (target.isTypeVariable()) {
+ ClassElement cls = target.getEnclosingClass();
ngeoffray 2013/03/11 10:24:06 assert that cls is also the enclosing class of the
karlklose 2013/03/12 09:05:02 Done.
+ compiler.world.classesUsingVariableExpression.add(cls);
ngeoffray 2013/03/11 10:24:06 classesUsingTypeVariableExpression.
ahe 2013/03/11 13:11:24 Could you please make an abstraction rather than a
karlklose 2013/03/12 09:05:02 Done, good point.
karlklose 2013/03/12 09:05:02 Done.
+ compiler.backend.registerTypeVariable();
} else if (target.impliesType() && !sendIsMemberAccess) {
compiler.backend.registerTypeLiteral();
}

Powered by Google App Engine
This is Rietveld 408576698