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

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

Issue 2863603004: Fix handling of null/bottom in front_end type inference. (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_inference_engine.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 21d03e5d52d35799d7a70a7a546bb80fc5d3fd43..33568aa7839767198cea240e85546cbd4605641f 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -139,8 +139,8 @@ abstract class TypeInferenceEngineImpl<F> extends TypeInferenceEngine<F> {
if (fieldHasInitializer(field)) {
var typeInferrer = getFieldTypeInferrer(field);
var type = getFieldDeclaredType(field);
- var inferredType =
- typeInferrer.inferFieldInitializer(field, type, type == null);
+ var inferredType = typeInferrer.inferDeclarationType(
+ typeInferrer.inferFieldInitializer(field, type, type == null));
if (type == null && strongMode) {
instrumentation?.record(
Uri.parse(typeInferrer.uri),

Powered by Google App Engine
This is Rietveld 408576698