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

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

Issue 2954403002: Add type inference for super method invocations. (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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart » ('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/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 4f078bcea0c574873c54fcace2fe13546c9c3e28..1f54e63af0a48d6111cb5650493a2b4a51443f30 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -897,13 +897,15 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
if (!target.isAccessor) {
if (areArgumentsCompatible(target.function, node.arguments)) {
Expression result = new KernelDirectMethodInvocation(
- new ThisExpression()..fileOffset = node.fileOffset,
+ new KernelThisExpression()..fileOffset = node.fileOffset,
target,
- node.arguments);
+ node.arguments)
+ ..fileOffset = node.fileOffset;
// TODO(ahe): Use [DirectMethodInvocation] when possible, that is,
// remove the next line:
result =
- new KernelSuperMethodInvocation(node.name, node.arguments, null);
+ new KernelSuperMethodInvocation(node.name, node.arguments, target)
Paul Berry 2017/06/26 18:57:55 Peter, can you confirm that passing `target` is th
Siggi Cherem (dart-lang) 2017/06/26 19:47:53 DBC - the answer might change in the near future w
Paul Berry 2017/06/27 20:50:17 Thanks for the heads up. I'm adding a test case t
+ ..fileOffset = node.fileOffset;
return result;
} else {
isNoSuchMethod = true;
@@ -915,7 +917,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
node.name.name, node.arguments, node.fileOffset);
}
Expression receiver = new KernelDirectPropertyGet(
- new ThisExpression()..fileOffset = node.fileOffset, target);
+ new KernelThisExpression()..fileOffset = node.fileOffset, target);
// TODO(ahe): Use [DirectPropertyGet] when possible, that is, remove the
// next line:
receiver = new KernelSuperPropertyGet(node.name, target);
@@ -992,7 +994,7 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper {
noSuchMethodName,
new Arguments(<Expression>[
library.loader.instantiateInvocation(
- new ThisExpression()..fileOffset = charOffset,
+ new KernelThisExpression()..fileOffset = charOffset,
name,
arguments,
charOffset,
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698