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

Unified Diff: pkg/compiler/lib/src/inferrer/inferrer_visitor.dart

Issue 2423953002: Change TypeInference to handle super calls as direct invocations. (Closed)
Patch Set: Fix comment. Created 4 years, 2 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: pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
index bff02bd231a2291c9df27330cedaf468f1e50601..d011dc0d1977cf619e93499e794b3dd9fa01cbf7 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
@@ -958,13 +958,6 @@ abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>>
}
}
- T _superType;
- T get superType {
- if (_superType != null) return _superType;
- return _superType =
- types.nonNullExact(outermostElement.enclosingClass.superclass);
- }
-
@override
T visitThisGet(Identifier node, _) {
return thisType;
@@ -974,7 +967,7 @@ abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>>
if (node.isThis()) {
return thisType;
} else if (node.isSuper()) {
- return superType;
+ return internalError(node, 'Unexpected expression $node.');
} else {
Element element = elements[node];
if (Elements.isLocal(element)) {

Powered by Google App Engine
This is Rietveld 408576698