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

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

Issue 2931363003: Add type inference for assignments to properties. (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/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 324352bb0207898f798338710c5ff07999484737..78420049dd2423fb4dca874cf50e60568dbb7fb0 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart
@@ -9,6 +9,7 @@ import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
KernelArguments,
KernelComplexAssignment,
KernelIndexAssign,
+ KernelPropertyAssign,
KernelStaticAssignment,
KernelThisExpression,
KernelVariableAssignment;
@@ -675,6 +676,10 @@ class PropertyAccessor extends kernel.PropertyAccessor with FastaAccessor {
helper, token, receiver, name, getter, setter);
}
}
+
+ @override
+ KernelComplexAssignment startComplexAssignment(Expression rhs) =>
+ new KernelPropertyAssign(receiver, rhs);
}
class StaticAccessor extends kernel.StaticAccessor with FastaAccessor {
@@ -772,6 +777,10 @@ class SuperPropertyAccessor extends kernel.SuperPropertyAccessor
}
toString() => "SuperPropertyAccessor()";
+
+ @override
+ KernelComplexAssignment startComplexAssignment(Expression rhs) =>
+ new KernelPropertyAssign(null, rhs, isSuper: true);
}
class ThisIndexAccessor extends kernel.ThisIndexAccessor with FastaAccessor {
@@ -834,6 +843,10 @@ class ThisPropertyAccessor extends kernel.ThisPropertyAccessor
}
toString() => "ThisPropertyAccessor()";
+
+ @override
+ KernelComplexAssignment startComplexAssignment(Expression rhs) =>
+ new KernelPropertyAssign(null, rhs);
}
class NullAwarePropertyAccessor extends kernel.NullAwarePropertyAccessor
@@ -851,6 +864,10 @@ class NullAwarePropertyAccessor extends kernel.NullAwarePropertyAccessor
}
toString() => "NullAwarePropertyAccessor()";
+
+ @override
+ KernelComplexAssignment startComplexAssignment(Expression rhs) =>
+ new KernelPropertyAssign(receiverExpression, rhs);
}
int adjustForImplicitCall(String name, int offset) {

Powered by Google App Engine
This is Rietveld 408576698