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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2993193002: When reordering constructor initializers, use correct types for temp vars. (Closed)
Patch Set: Created 3 years, 4 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/kernel/body_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index 0785c5ca4c2a9c53145af84ade12fee47e7b2160..50c17cbb4d004483065c8ea0d578ea748537c30c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -511,7 +511,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
initializer = buildFieldInitializer(true, formal.name,
formal.charOffset, new VariableGet(formal.declaration));
}
- member.addInitializer(initializer);
+ member.addInitializer(initializer, _typeInferrer);
}
}
}
@@ -573,7 +573,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
}
_typeInferrer.inferInitializer(initializer);
if (member is KernelConstructorBuilder && !member.isExternal) {
- member.addInitializer(initializer);
+ member.addInitializer(initializer, _typeInferrer);
} else {
deprecated_addCompileTimeError(
token.charOffset, "Can't have initializers: ${member.name}");

Powered by Google App Engine
This is Rietveld 408576698