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

Unified Diff: pkg/compiler/lib/src/types/container_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
Index: pkg/compiler/lib/src/types/container_type_mask.dart
diff --git a/pkg/compiler/lib/src/types/container_type_mask.dart b/pkg/compiler/lib/src/types/container_type_mask.dart
index 5f224627923bb986c1faf264317d03621d4b538a..c38a03ab5bc8bf2920f7c27c6d0e6810279f6215 100644
--- a/pkg/compiler/lib/src/types/container_type_mask.dart
+++ b/pkg/compiler/lib/src/types/container_type_mask.dart
@@ -61,7 +61,7 @@ class ContainerTypeMask extends ForwardingTypeMask {
TypeMask intersection(TypeMask other, ClassWorld classWorld) {
TypeMask forwardIntersection = forwardTo.intersection(other, classWorld);
- if (forwardIntersection.isEmpty) return forwardIntersection;
+ if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
return forwardIntersection.isNullable
? nullable()
: nonNullable();
@@ -72,7 +72,7 @@ class ContainerTypeMask extends ForwardingTypeMask {
return this;
} else if (equalsDisregardNull(other)) {
return other.isNullable ? other : this;
- } else if (other.isEmpty) {
+ } else if (other.isEmptyOrNull) {
return other.isNullable ? this.nullable() : this;
} else if (other.isContainer
&& elementType != null
« no previous file with comments | « pkg/compiler/lib/src/ssa/types_propagation.dart ('k') | pkg/compiler/lib/src/types/dictionary_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698