Index: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
index c7b4bce4de4bccf46e074ca3f043787a7e098aac..0611a871cbcb00421c7ff844fbdc34a2ce22fca3 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart |
@@ -1445,7 +1445,7 @@ class KernelPropertyAssign extends KernelComplexAssignmentWithReceiver { |
// To replicate analyzer behavior, we base type inference on the write |
// member. TODO(paulberry): would it be better to use the read member when |
// doing compound assignment? |
- var writeContext = writeMember?.setterType; |
+ var writeContext = inferrer.getSetterType(writeMember, receiverType); |
var inferredType = _inferRhs(inferrer, writeContext); |
inferrer.listener.propertyAssignExit(desugared, inferredType); |
return inferredType; |