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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 1469353008: dart2js: Type inferrence: Account for implicit null test in '??' and '??='. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 61f8595ff3abda9e54aa8e54679c6720a49522ad..2ae18625ea0b1e1d7b76940aa7e08d707483be0d 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -83,6 +83,10 @@ class TypeMaskSystem implements TypeSystem<TypeMask> {
return type.intersection(otherType, classWorld);
}
+ TypeMask narrowNotNull(TypeMask type) {
+ return type.nonNullable();
+ }
+
TypeMask computeLUB(TypeMask firstType, TypeMask secondType) {
if (firstType == null) {
return secondType;

Powered by Google App Engine
This is Rietveld 408576698