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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/types.dart

Issue 11412245: MalformedType used for all invalid type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years 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/ssa/types.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/types.dart b/sdk/lib/_internal/compiler/implementation/ssa/types.dart
index 52a20e787d1ff747740bf137d3e3d5d6bb6bd75b..12800abba88af94f5edb49a42d3c28882aec241f 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/types.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/types.dart
@@ -743,10 +743,12 @@ class HBoundedType extends HType {
}
// If one type is a subtype of the other, we return the former,
// which is the narrower type.
- } else if (compiler.types.isSubtype(type, other.type)) {
- return this;
- } else if (compiler.types.isSubtype(other.type, type)) {
- return other;
+ } else if (!type.isMalformed && !other.type.isMalformed) {
+ if (compiler.types.isSubtype(type, other.type)) {
+ return this;
+ } else if (compiler.types.isSubtype(other.type, type)) {
+ return other;
+ }
}
}
if (other.isUnknown()) return this;

Powered by Google App Engine
This is Rietveld 408576698