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

Unified Diff: pkg/compiler/lib/src/types/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/map_type_mask.dart ('k') | pkg/compiler/lib/src/types/union_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/type_mask.dart
diff --git a/pkg/compiler/lib/src/types/type_mask.dart b/pkg/compiler/lib/src/types/type_mask.dart
index 736df0d614f3ef32e2e76d995e4648cb5fdbc9a2..0fdd5792db34761368678d42f04a347772464d66 100644
--- a/pkg/compiler/lib/src/types/type_mask.dart
+++ b/pkg/compiler/lib/src/types/type_mask.dart
@@ -247,8 +247,20 @@ abstract class TypeMask implements ReceiverConstraint, AbstractValue {
*/
TypeMask nonNullable();
+ /// Whether nothing matches this mask, not even null.
bool get isEmpty;
+
+ /// Whether null is a valid value of this mask.
bool get isNullable;
+
+ /// Whether the only possible value in this mask is Null.
+ bool get isNull;
+
+ /// Whether [isEmpty] or [isNull] is true.
+ bool get isEmptyOrNull;
+
+ /// Whether this mask only includes instances of an exact class, and none of
+ /// it's subclasses or subtypes.
bool get isExact;
/// Returns true if this mask is a union type.
« no previous file with comments | « pkg/compiler/lib/src/types/map_type_mask.dart ('k') | pkg/compiler/lib/src/types/union_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698