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

Unified Diff: pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart

Issue 2757753002: Migrate DDC to the new analysis driver.
Patch Set: Rebase Created 3 years, 6 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/dev_compiler/lib/src/compiler/nullable_type_inference.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
index dbba17103ecbab2aa55ccc7736710580ac6de378..ce902d1c6cb5156e72af5091e24fd3fc40286b57 100644
--- a/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
+++ b/pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart
@@ -86,7 +86,7 @@ abstract class NullableTypeInference {
PropertyInducingElement variable = element.variable;
var isVirtual =
variable is FieldElement && virtualFields.isVirtual(variable);
- return isVirtual || (variable.computeConstantValue()?.isNull ?? true);
+ return isVirtual || (variable.constantValue?.isNull ?? true);
}
// Other types of identifiers are nullable (parameters, fields).
@@ -190,7 +190,7 @@ abstract class NullableTypeInference {
}
}
- if (e?.name == 'identical' && identical(e.library, dartCoreLibrary)) {
+ if (e != null && e.name == 'identical' && e.library.isDartCore) {
return false;
}
}
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/extension_types.dart ('k') | pkg/dev_compiler/lib/src/compiler/side_effect_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698