[M] Change in dart/sdk[main]: [DAS] Fixes primary constructor body completion

1 view
Skip to first unread message

FMorschel (Gerrit)

unread,
Aug 4, 2026, 12:03:13 PM (yesterday) Aug 4
to dart-analys...@google.com, rev...@dartlang.org

FMorschel has uploaded the change for review

Commit message

[DAS] Fixes primary constructor body completion
Change-Id: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c

Change information

Files:
  • M pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
  • M pkg/analysis_server/lib/src/services/completion/dart/in_scope_completion_pass.dart
  • M pkg/analysis_server/test/services/completion/dart/location/primary_constructor_declaration_test.dart
Change size: M
Delta: 3 files changed, 58 insertions(+), 3 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
Gerrit-Change-Number: 531180
Gerrit-PatchSet: 1
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
Aug 4, 2026, 12:53:33 PM (yesterday) Aug 4
to FMorschel, Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from FMorschel and Samuel Rawlins

Brian Wilkerson added 2 comments

File pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
Line 1270, Patchset 1 (Latest): case FieldDeclaration():
Brian Wilkerson . resolved

This is probably where https://github.com/dart-lang/sdk/issues/63931 needs to be fixed.

Line 2713, Patchset 1 (Latest): _suggestParameter(declaredElement);
Brian Wilkerson . unresolved

This looks wrong. It looks like we will suggest both the field and the parameter when it's a field formal parameter. But only one name is visible in any given scope, so we should have logic here to determine which it is.

Open in Gerrit

Related details

Attention is currently required from:
  • FMorschel
  • Samuel Rawlins
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
Gerrit-Change-Number: 531180
Gerrit-PatchSet: 1
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: FMorschel <g...@fmorschel.dev>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 16:53:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

FMorschel (Gerrit)

unread,
Aug 4, 2026, 6:52:59 PM (yesterday) Aug 4
to Brian Wilkerson, Samuel Rawlins, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson and Samuel Rawlins

FMorschel voted and added 1 comment

Votes added by FMorschel

Auto-Submit+1

1 comment

File pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
Line 2713, Patchset 1: _suggestParameter(declaredElement);
Brian Wilkerson . resolved

This looks wrong. It looks like we will suggest both the field and the parameter when it's a field formal parameter. But only one name is visible in any given scope, so we should have logic here to determine which it is.

FMorschel

Oh, thanks! It would hide it because of the name clash, but yes, I was missing an `else` here.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
  • Samuel Rawlins
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not 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: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
Gerrit-Change-Number: 531180
Gerrit-PatchSet: 3
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 22:52:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
Aug 4, 2026, 7:11:01 PM (24 hours ago) Aug 4
to FMorschel, Keerti Parthasarathy, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from FMorschel and Keerti Parthasarathy

Brian Wilkerson voted

Code-Review+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • FMorschel
  • Keerti Parthasarathy
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: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
Gerrit-Change-Number: 531180
Gerrit-PatchSet: 3
Gerrit-Owner: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
Gerrit-Attention: FMorschel <g...@fmorschel.dev>
Gerrit-Attention: Keerti Parthasarathy <kee...@google.com>
Gerrit-Comment-Date: Tue, 04 Aug 2026 23:10:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Keerti Parthasarathy (Gerrit)

unread,
1:55 PM (5 hours ago) 1:55 PM
to FMorschel, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from FMorschel

Keerti Parthasarathy voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • FMorschel
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement 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: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
    Gerrit-Change-Number: 531180
    Gerrit-PatchSet: 3
    Gerrit-Owner: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
    Gerrit-Attention: FMorschel <g...@fmorschel.dev>
    Gerrit-Comment-Date: Wed, 05 Aug 2026 17:55:09 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Keerti Parthasarathy (Gerrit)

    unread,
    1:55 PM (5 hours ago) 1:55 PM
    to FMorschel, dart-...@luci-project-accounts.iam.gserviceaccount.com, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
    Attention needed from FMorschel

    Keerti Parthasarathy voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • FMorschel
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement 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: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
    Gerrit-Change-Number: 531180
    Gerrit-PatchSet: 3
    Gerrit-Owner: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
    Gerrit-Attention: FMorschel <g...@fmorschel.dev>
    Gerrit-Comment-Date: Wed, 05 Aug 2026 17:55:15 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

    unread,
    1:55 PM (5 hours ago) 1:55 PM
    to FMorschel, Keerti Parthasarathy, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org

    dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change

    Change information

    Commit message:
    [DAS] Fixes primary constructor body completion

    Fixes: https://github.com/dart-lang/sdk/issues/63950
    Change-Id: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
    Reviewed-by: Keerti Parthasarathy <kee...@google.com>
    Reviewed-by: Brian Wilkerson <brianwi...@google.com>
    Auto-Submit: FMorschel <g...@fmorschel.dev>
    Commit-Queue: Keerti Parthasarathy <kee...@google.com>
    Files:
    • M pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
    • M pkg/analysis_server/lib/src/services/completion/dart/in_scope_completion_pass.dart
    • M pkg/analysis_server/test/services/completion/dart/location/field_declaration_test.dart
    • M pkg/analysis_server/test/services/completion/dart/location/primary_constructor_declaration_test.dart
    Change size: M
    Delta: 4 files changed, 82 insertions(+), 5 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Brian Wilkerson, +1 by Keerti Parthasarathy
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I1de0af89174065d5c24d4dd2d8009a58bdb1be8c
    Gerrit-Change-Number: 531180
    Gerrit-PatchSet: 4
    Gerrit-Owner: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: FMorschel <g...@fmorschel.dev>
    Gerrit-Reviewer: Keerti Parthasarathy <kee...@google.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages