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

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

Issue 2925603002: Add type inference for `this` expressions. (Closed)
Patch Set: Address code review comment 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/fasta_accessors.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart b/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
index 4ab29f91e69b9370f2b6842a017b182944c93363..f4afd3b607c89444f038ee63315d4da35389c16e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
@@ -5,7 +5,7 @@
library fasta.fasta_accessors;
import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
- show KernelArguments;
+ show KernelArguments, KernelThisExpression;
import 'package:front_end/src/fasta/kernel/utils.dart' show offsetForToken;
@@ -286,7 +286,7 @@ class ThisAccessor extends FastaAccessor {
Expression buildSimpleRead() {
if (!isSuper) {
- return new ThisExpression();
+ return new KernelThisExpression();
} else {
return helper.buildCompileTimeError(
"Can't use `super` as an expression.", offsetForToken(token));
@@ -313,7 +313,7 @@ class ThisAccessor extends FastaAccessor {
// Notice that 'this' or 'super' can't be null. So we can ignore the
// value of [isNullAware].
MethodInvocation result = helper.buildMethodInvocation(
- new ThisExpression(),
+ new KernelThisExpression(),
send.name,
send.arguments,
offsetForToken(token));
@@ -336,7 +336,7 @@ class ThisAccessor extends FastaAccessor {
return buildConstructorInitializer(offset, new Name(""), arguments);
} else {
return helper.buildMethodInvocation(
- new ThisExpression(), callName, arguments, offset);
+ new KernelThisExpression(), callName, arguments, offset);
}
}
@@ -756,7 +756,7 @@ class ThisPropertyAccessor extends kernel.ThisPropertyAccessor
interfaceTarget = null;
}
return helper.buildMethodInvocation(
- new ThisExpression(), name, arguments, offset);
+ new KernelThisExpression(), name, arguments, offset);
}
toString() => "ThisPropertyAccessor()";

Powered by Google App Engine
This is Rietveld 408576698