Skip to content

Commit

Permalink
Field promotion: allow super.property to be promoted.
Browse files Browse the repository at this point in the history
Fixes test language/inference_update_2/field_invocation_promotion_test
on front end configurations.

Note that there is still an outstanding problem with `this.property`
and `super.property` getting treated as synonymous
(dart-lang/sdk#50138).  That will be
addressed in a later CL.

Bug: dart-lang/language#2020
Change-Id: Idb95601b47711df5ca7517c83621638783446e45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269743
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
  • Loading branch information
stereotype441 authored and Commit Queue committed Nov 15, 2022
1 parent 6002964 commit 3207808
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3387,8 +3387,9 @@ abstract class InferenceVisitorBase implements InferenceVisitor {
if (member is Procedure && member.kind == ProcedureKind.Method) {
return instantiateTearOff(inferredType, typeContext, expression);
}
flowAnalysis.thisOrSuperPropertyGet(
expression, name.text, member, inferredType);
inferredType = flowAnalysis.thisOrSuperPropertyGet(
expression, name.text, member, inferredType) ??
inferredType;
return new ExpressionInferenceResult(inferredType, expression);
}

Expand Down

0 comments on commit 3207808

Please sign in to comment.