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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.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
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index fe98524488a7c470774e773e93774a83aa135973..8ad5da6bf4e417731f96bf9bdb32ea08ffbeb490 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -11,7 +11,7 @@ import '../common/names.dart' show Identifiers;
import '../compiler.dart' show Compiler;
import '../constants/values.dart';
import '../elements/resolution_types.dart'
- show DartType, FunctionType, TypeKind;
+ show DartType, FunctionType, InterfaceType, TypeKind;
import '../elements/elements.dart';
import '../js_backend/backend.dart';
import '../tree/dartstring.dart' show DartString;
@@ -1739,8 +1739,8 @@ TypeMask _narrowType(
} else if (annotation.isVoid) {
otherType = closedWorld.commonMasks.nullType;
} else {
- assert(annotation.isInterfaceType);
- otherType = new TypeMask.nonNullSubtype(annotation.element, closedWorld);
+ InterfaceType interfaceType = annotation;
+ otherType = new TypeMask.nonNullSubtype(interfaceType.element, closedWorld);
}
if (isNullable) otherType = otherType.nullable();
if (type == null) return otherType;

Powered by Google App Engine
This is Rietveld 408576698