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

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

Issue 12389049: Fix --host-checked mode and add proper canBePrimitive method to HBoundedType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove type. Created 7 years, 10 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/types/type_mask.dart
diff --git a/sdk/lib/_internal/compiler/implementation/types/type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/type_mask.dart
index ffc8d906782f1c2024aa7d9c95ff85eb20d83048..828be8744b9c563b9ce50f852df71818b493a84e 100644
--- a/sdk/lib/_internal/compiler/implementation/types/type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/type_mask.dart
@@ -59,9 +59,11 @@ class TypeMask {
* Returns whether or not this type mask contains the given type.
*/
bool contains(DartType type, Compiler compiler) {
- // TODO(kasperl): Get rid of this handling.
+ // TODO(kasperl): Do this error handling earlier.
if (base.isMalformed) return isSubtype;
- assert(!type.isMalformed);
+ if (base.kind != TypeKind.INTERFACE) return false;
+ assert(type.kind == TypeKind.INTERFACE);
+ // Compare the interface types.
ClassElement baseElement = base.element;
ClassElement typeElement = type.element;
if (isExact) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/types.dart ('k') | tests/compiler/dart2js/type_combination_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698