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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart

Issue 304153014: Remove element from DynamicType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix infinite loop. Created 6 years, 7 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/inferrer/simple_types_inferrer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
index efa3e8680b46e141fd28292f3a23aed235ed3060..e74d9abf619ce5e08c30b0896bf34d5d6fbfe7b7 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
@@ -36,16 +36,15 @@ class TypeMaskSystem implements TypeSystem<TypeMask> {
if (annotation.treatAsDynamic) return type;
if (annotation.element == compiler.objectClass) return type;
TypeMask otherType;
- if (annotation.kind == TypeKind.TYPEDEF
- || annotation.kind == TypeKind.FUNCTION) {
+ if (annotation.isTypedef || annotation.isFunctionType) {
otherType = functionType;
- } else if (annotation.kind == TypeKind.TYPE_VARIABLE) {
+ } else if (annotation.isTypeVariable) {
// TODO(ngeoffray): Narrow to bound.
return type;
} else if (annotation.isVoid) {
otherType = nullType;
} else {
- assert(annotation.kind == TypeKind.INTERFACE);
+ assert(annotation.isInterfaceType);
otherType = new TypeMask.nonNullSubtype(annotation.element);
}
if (isNullable) otherType = otherType.nullable();

Powered by Google App Engine
This is Rietveld 408576698