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

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

Issue 2928613003: Fix corner cases of type inference with implicit references to `.call`. (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 f9702638281923ffda82524b533045f552c419c1..d7a3571bb9009d3c9f591dc004fb999cc6fe1c3a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -645,7 +645,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
return receiver.doInvocation(charOffset, arguments);
} else {
return buildMethodInvocation(
- toValue(receiver), callName, arguments, charOffset);
+ toValue(receiver), callName, arguments, charOffset,
+ isImplicitCall: true);
}
}
@@ -795,7 +796,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
// next line:
receiver = new KernelSuperPropertyGet(node.name, target);
return buildMethodInvocation(
- receiver, callName, node.arguments, node.fileOffset);
+ receiver, callName, node.arguments, node.fileOffset,
+ isImplicitCall: true);
}
bool areArgumentsCompatible(FunctionNode function, Arguments arguments) {
@@ -2847,7 +2849,9 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
@override
Expression buildMethodInvocation(
Expression receiver, Name name, Arguments arguments, int offset,
- {bool isConstantExpression: false, bool isNullAware: false}) {
+ {bool isConstantExpression: false,
+ bool isNullAware: false,
+ bool isImplicitCall: false}) {
if (constantExpressionRequired && !isConstantExpression) {
return buildCompileTimeError("Not a constant expression.", offset);
}
@@ -2862,7 +2866,8 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
..fileOffset = offset,
const DynamicType()));
} else {
- return new KernelMethodInvocation(receiver, name, arguments)
+ return new KernelMethodInvocation(receiver, name, arguments,
+ isImplicitCall: isImplicitCall)
..fileOffset = offset;
}
}

Powered by Google App Engine
This is Rietveld 408576698