[M] Change in dart/sdk[main]: [analysis_server] Support primary constructors in navigation

0 views
Skip to first unread message

Brian Wilkerson (Gerrit)

unread,
Jan 21, 2026, 2:34:57 PM (10 hours ago) Jan 21
to Danny Tuppeny, Samuel Rawlins, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Danny Tuppeny and Samuel Rawlins

Brian Wilkerson voted and added 2 comments

Votes added by Brian Wilkerson

Code-Review+1
Commit-Queue+1

2 comments

File pkg/analysis_server/test/lsp/definition_test.dart
Line 190, Patchset 1 (Latest): Future<void> test_atDeclaration_primaryConstructor() async {
Brian Wilkerson . unresolved

What, if anything, do we want to do for the body of a primary constructor?

```dart
class C(var int x) {
th^is {
print(x);
}
}
```

Should it go to itself? To the parameter list?

Do we want to just punt on it and wait until we have a UX decision before we try to write tests?

See https://github.com/dart-lang/language/issues/4611 for some discussion.

Also, it would be good to have tests for navigation within the parameter list. It should just work (with the possible exception of declaring parameters), but we should confirm.

Line 1318, Patchset 1 (Latest): Future<void> test_primaryConstrctor() async {
Brian Wilkerson . resolved

nit: typo

Open in Gerrit

Related details

Attention is currently required from:
  • Danny Tuppeny
  • Samuel Rawlins
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I2182d58e792eae85c60ff145196c90affcb32085
Gerrit-Change-Number: 474820
Gerrit-PatchSet: 1
Gerrit-Owner: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Wed, 21 Jan 2026 19:34:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages