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

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

Issue 2900873002: Fix type inference of assignments to local variables. (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
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/strong.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index de175ea05c99d481b08bbb68012a984ee1394ad2..9d0354b0a0c45d0af8c6ee50313fca4c35436637 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -1269,8 +1269,6 @@ class KernelVariableDeclaration extends VariableDeclaration
isFinal: isFinal,
isConst: isConst);
- DartType get _declaredType => _implicitlyTyped ? null : type;
-
@override
void _inferStatement(KernelTypeInferrer inferrer) {
inferrer.listener.variableDeclarationEnter(this);
@@ -1339,7 +1337,7 @@ class KernelVariableSet extends VariableSet implements KernelExpression {
typeNeeded =
inferrer.listener.variableSetEnter(this, typeContext) || typeNeeded;
var inferredType =
- inferrer.inferExpression(value, variable._declaredType, typeNeeded);
+ inferrer.inferExpression(value, variable.type, typeNeeded);
inferrer.listener.variableSetExit(this, inferredType);
return inferredType;
}
« no previous file with comments | « no previous file | pkg/front_end/test/fasta/strong.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698