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

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

Issue 2613833005: Use entities in the TypeMask interface. (Closed)
Patch Set: dartfmt Created 3 years, 11 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 0f27c83460a42ac29f4441b775f03c9908b91d05..a61b9e9bc476ccf2dae7c319c97d465356026583 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -11,7 +11,7 @@ import '../common/names.dart' show Identifiers;
import '../compiler.dart' show Compiler;
import '../constants/expressions.dart' show ConstantExpression;
import '../constants/values.dart';
-import '../elements/resolution_types.dart' show DartType;
+import '../elements/resolution_types.dart' show DartType, InterfaceType;
Siggi Cherem (dart-lang) 2017/01/06 20:48:36 I assume this is pending a rebase? (ResolutionInte
Johnni Winther 2017/01/09 09:05:04 Yes.
import '../elements/elements.dart';
import '../js_backend/js_backend.dart' show Annotations, JavaScriptBackend;
import '../resolution/tree_elements.dart' show TreeElementMapping;
@@ -284,10 +284,10 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
// TODO(ngeoffray): Narrow to bound.
return type;
} else {
- assert(annotation.isInterfaceType);
+ InterfaceType interface = annotation;
otherType = annotation.element == closedWorld.commonElements.objectClass
? dynamicType.type.nonNullable()
- : new TypeMask.nonNullSubtype(annotation.element, closedWorld);
+ : new TypeMask.nonNullSubtype(interface.element, closedWorld);
}
if (isNullable) otherType = otherType.nullable();
if (type.type.isExact) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/type_graph_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698