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

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: Address comments. 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 cb5811e80bbe66ab8f6b6e4a5f9e9484c7ee1dcd..37529867d106e828efb3d2d3b066b29b5cebd2e0 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2198,6 +2198,11 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
warnAndCreateErroneousElement(node.selector, field.name,
MessageKind.CANNOT_RESOLVE_GETTER);
}
+ } else if (target.isTypeVariable()) {
+ ClassElement cls = target.getEnclosingClass();
+ assert(enclosingElement.getEnclosingClass() == cls);
+ compiler.world.registerClassUsingVariableExpression(cls);
ngeoffray 2013/03/12 09:18:07 As discussed, it'd be nice to not have to do this,
karlklose 2013/03/12 09:35:22 I'll move all RTI infrastructure from World to Run
+ compiler.backend.registerTypeVariableExpression(mapping);
} else if (target.impliesType() && !sendIsMemberAccess) {
compiler.backend.registerTypeLiteral(mapping);
}

Powered by Google App Engine
This is Rietveld 408576698