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

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

Issue 12210142: Implement is-checks against type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 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 7e069cc75aee3c54f8305815a103efd8c969c919..db623942fdae10e3ca992f2280119136526370ec 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2427,7 +2427,11 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
ClassElement cls = constructor.defaultImplementation.getEnclosingClass();
// [cls] might be the implementation element and only declaration elements
// may be registered.
- world.registerInstantiatedClass(cls.declaration);
+ DartType type = mapping.getType(node);
+ world.registerInstantiatedType(type);
+ if (type.containsTypeVariable) {
+ compiler.backend.registerGetRuntimeTypeArgument();
ngeoffray 2013/02/27 12:36:28 Why? If there is no is check, there is no need for
karlklose 2013/02/27 16:11:32 Obsolete.
+ }
if (cls.isAbstract(compiler)) {
compiler.backend.registerAbstractClassInstantiation();
}
@@ -2497,9 +2501,7 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
analyzeTypeArgument(type, argument);
});
}
- // TODO(ngeoffray): Also handle cases like:
- // 1) a is T
- // 2) T a (in checked mode).
+ // TODO(ngeoffray): Also handle T a (in checked mode).
}
return type;
}

Powered by Google App Engine
This is Rietveld 408576698