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

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: Restore comment. 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 c13a959fba023648db53175a4c61313727423049..466ae9415a17ce560ac33b81dfc85821bf31e1d0 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2450,10 +2450,11 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
itf.typeArguments.forEach((DartType argument) {
analyzeTypeArgument(type, argument);
});
+ } else if (type is TypeVariableType) {
+ ClassElement currentClass = enclosingElement.getEnclosingClass();
ahe 2013/02/14 16:58:33 I think this is shadowing a field (which contains
karlklose 2013/02/18 16:02:01 Done, removed.
+ compiler.world.registerTypeVariableCheck(currentClass);
ngeoffray 2013/02/18 09:27:58 Register in resolver world?
karlklose 2013/02/18 16:02:01 Why? This is done to add the class to the set of c
ngeoffray 2013/02/19 09:00:41 If codegen doesn't need to know what classes make
karlklose 2013/02/19 12:39:28 I moved this set to the backend.
}
- // 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