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

Unified Diff: pkg/compiler/lib/src/types/union_type_mask.dart

Issue 1755823003: Replace TypeMask.isEmpty by isEmptyOrNull, use isEmpty when it's really empty. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/types/type_mask.dart ('k') | pkg/compiler/lib/src/types/value_type_mask.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/union_type_mask.dart
diff --git a/pkg/compiler/lib/src/types/union_type_mask.dart b/pkg/compiler/lib/src/types/union_type_mask.dart
index 61663499171b5bfdd9a94c4b7541b9a857f1bfd4..9cd5bcb023255f54db93311b7f6345d5db80c9ad 100644
--- a/pkg/compiler/lib/src/types/union_type_mask.dart
+++ b/pkg/compiler/lib/src/types/union_type_mask.dart
@@ -43,7 +43,7 @@ class UnionTypeMask implements TypeMask {
if (mask.isUnion) {
UnionTypeMask union = mask;
unionOfHelper(union.disjointMasks, disjoint, classWorld);
- } else if (mask.isEmpty && !mask.isNullable) {
+ } else if (mask.isEmpty) {
continue;
} else {
FlatTypeMask flatMask = mask;
@@ -192,7 +192,9 @@ class UnionTypeMask implements TypeMask {
return new UnionTypeMask._internal(newIterable);
}
+ bool get isEmptyOrNull => false;
bool get isEmpty => false;
+ bool get isNull => false;
bool get isNullable => disjointMasks.any((e) => e.isNullable);
bool get isExact => false;
bool get isUnion => true;
« no previous file with comments | « pkg/compiler/lib/src/types/type_mask.dart ('k') | pkg/compiler/lib/src/types/value_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698