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

Unified Diff: pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart

Issue 2886873005: Minor type inference fixes to do with null and bottom types. (Closed)
Patch Set: Created 3 years, 7 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/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
index 3165a2449736cdd067c59477573e858cd0917daf..202293e7b048997012a4c603921dacce00e2008d 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_schema_environment.dart
@@ -355,6 +355,9 @@ class TypeSchemaEnvironment extends TypeEnvironment {
bool isBottom(DartType t) {
if (t is UnknownType) {
return true;
+ } else if (t is InterfaceType &&
+ identical(t.classNode, coreTypes.nullClass)) {
+ return true;
} else {
return super.isBottom(t);
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart ('k') | pkg/front_end/test/fasta/strong.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698