bf13d89902
Previously the pattern would only be recorded as a reference to the getter. If there was a reference to the declared variable elsewhere in the visited code, it would then record the variable declaration (via the reference). In LSP, we locate declarations by only looking at the node at the cursor, so we can't rely on the declaration being recorded by some other reference (if one even exists) so this ensure it is recorded explicitly. Fixes https://github.com/dart-lang/sdk/issues/53554. Change-Id: I8983d0637f2d89a427fb1fa11293eec8e06fede8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326700 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>