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

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

Issue 2926763003: Add type inference for complex assignments whose LHS is an index expression. (Closed)
Patch Set: 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/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 d7a3571bb9009d3c9f591dc004fb999cc6fe1c3a..5a7c0d81dea82c322cd954fec9950500acd06eda 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -747,8 +747,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
VariableDeclaration variable = new VariableDeclaration.forValue(a);
push(makeLet(
variable,
- new ConditionalExpression(buildIsNull(new VariableGet(variable)), b,
- new VariableGet(variable), const DynamicType())));
+ new KernelConditionalExpression(buildIsNull(new VariableGet(variable)),
+ b, new VariableGet(variable))));
}
/// Handle `a?.b(...)`.
@@ -2859,12 +2859,11 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
VariableDeclaration variable = new VariableDeclaration.forValue(receiver);
return makeLet(
variable,
- new ConditionalExpression(
+ new KernelConditionalExpression(
buildIsNull(new VariableGet(variable)),
new NullLiteral(),
new MethodInvocation(new VariableGet(variable), name, arguments)
- ..fileOffset = offset,
- const DynamicType()));
+ ..fileOffset = offset));
} else {
return new KernelMethodInvocation(receiver, name, arguments,
isImplicitCall: isImplicitCall)

Powered by Google App Engine
This is Rietveld 408576698