SIGN IN SIGN UP

Enhance completion to work for this_promotion

Changes completion in two ways.

First, completion after `this.` now uses the promoted type of `this`
when it exists.

Second, completion in a context where an implicit reference to `this`
is allowed also uses the promoted type. There is one wrinkle here,
but I expect that users won't notice or care: if the enclosing class
defines a member `m` and that member is overridden in a subtype
(whether in the promoted type or above), then the `m` in the enclosing
class will be suggested rather than the override of it. This will be
visible in the UI, hence the reason I'm mentioning it.

This differs from the way resolution works, but fixing it would be
more complex that I think it's worth.

Closes https://github.com/dart-lang/sdk/issues/63891

Change-Id: Icb3e0f97d7aaee41d9c24657ff8f318a4d70b0dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/542080
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
B
Brian Wilkerson committed
967bed205c83cba3ac05b0f8d084d11291e93ff1
Parent: 7db2c6a
Committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> on 8/28/2026, 10:14:03 PM