[L] Change in dart/sdk[main]: [private named parameters] Report collision between public name and o...

0 views
Skip to first unread message

Bob Nystrom (Gerrit)

unread,
Dec 1, 2025, 5:34:24 PM (22 hours ago) Dec 1
to Johnni Winther, dart-fe-te...@google.com, dart-uxr...@google.com, rev...@dartlang.org
Attention needed from Johnni Winther

Bob Nystrom voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Johnni Winther
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: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018
Gerrit-Change-Number: 465461
Gerrit-PatchSet: 1
Gerrit-Owner: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Attention: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Mon, 01 Dec 2025 22:34:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Johnni Winther (Gerrit)

unread,
5:49 AM (10 hours ago) 5:49 AM
to Bob Nystrom, Commit Queue, dart-fe-te...@google.com, dart-uxr...@google.com, rev...@dartlang.org
Attention needed from Bob Nystrom

Johnni Winther voted and added 2 comments

Votes added by Johnni Winther

Code-Review+1

2 comments

File pkg/front_end/messages.status
Line 174, Patchset 4 (Latest):front_end/PrivateNamedParameterDuplicatePublicName/part_wrapped_script: hasOnlyUnrelatedMessages
front_end/PrivateNamedParameterDuplicatePublicName/script: hasOnlyUnrelatedMessages
front_end/PrivateNamedParameterWithoutPublicName/part_wrapped_script: hasOnlyUnrelatedMessages
Johnni Winther . unresolved

I guess this is for the unsupported experiment. See below how to fix this.

File pkg/front_end/messages.yaml
Line 1590, Patchset 4 (Latest):PrivateNamedParameterDuplicatePublicName:
Johnni Winther . unresolved

You can add the option `experiments: private-named-parameters` to avoid the error about unsupported experiment.

Open in Gerrit

Related details

Attention is currently required from:
  • Bob Nystrom
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: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018
Gerrit-Change-Number: 465461
Gerrit-PatchSet: 4
Gerrit-Owner: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Attention: Bob Nystrom <rnys...@google.com>
Gerrit-Comment-Date: Tue, 02 Dec 2025 10:49:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Bob Nystrom (Gerrit)

unread,
1:39 PM (2 hours ago) 1:39 PM
to Johnni Winther, Commit Queue, dart-fe-te...@google.com, dart-uxr...@google.com, rev...@dartlang.org

Bob Nystrom voted and added 2 comments

Votes added by Bob Nystrom

Auto-Submit+1

2 comments

File pkg/front_end/messages.status
Line 174, Patchset 4:front_end/PrivateNamedParameterDuplicatePublicName/part_wrapped_script: hasOnlyUnrelatedMessages
front_end/PrivateNamedParameterDuplicatePublicName/script: hasOnlyUnrelatedMessages
front_end/PrivateNamedParameterWithoutPublicName/part_wrapped_script: hasOnlyUnrelatedMessages
Johnni Winther . resolved

I guess this is for the unsupported experiment. See below how to fix this.

Bob Nystrom

Yes, it is. Thanks for the fix!

File pkg/front_end/messages.yaml
Line 1590, Patchset 4:PrivateNamedParameterDuplicatePublicName:
Johnni Winther . resolved

You can add the option `experiments: private-named-parameters` to avoid the error about unsupported experiment.

Bob Nystrom

Done

Open in Gerrit

Related details

Attention set is empty
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: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018
Gerrit-Change-Number: 465461
Gerrit-PatchSet: 4
Gerrit-Owner: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Tue, 02 Dec 2025 18:39:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Johnni Winther <johnni...@google.com>
satisfied_requirement
open
diffy

Bob Nystrom (Gerrit)

unread,
1:39 PM (2 hours ago) 1:39 PM
to Johnni Winther, Commit Queue, dart-fe-te...@google.com, dart-uxr...@google.com, rev...@dartlang.org

Bob Nystrom voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
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: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018
Gerrit-Change-Number: 465461
Gerrit-PatchSet: 5
Gerrit-Owner: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Comment-Date: Tue, 02 Dec 2025 18:39:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
2:24 PM (1 hour ago) 2:24 PM
to Bob Nystrom, Johnni Winther, dart-fe-te...@google.com, dart-uxr...@google.com, rev...@dartlang.org

Commit Queue submitted the change with unreviewed changes

Unreviewed changes

4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: pkg/front_end/messages.status
Insertions: 0, Deletions: 13.

@@ -163,19 +163,6 @@
front_end/WasmImportOrExportInUserCode/example: missingExample # only issued by wasm build
front_end/WebLiteralCannotBeRepresentedExactly/example: missingExample # only issued on web build

-# An invalid private named parameter produces one of two errors depending on
-# whether the "private-named-parameters" experiment is enabled. By default with
-# the experiment off, it shows the old error (PrivateOptionalParameter), even
-# for the example in the new error code. Allow that for now.
-# TODO(rnystrom): Decide if we want to consolidate to one single error when the
-# experiment is closer to shipping.
-front_end/PrivateNamedNonFieldParameter/part_wrapped_script: hasOnlyUnrelatedMessages
-front_end/PrivateNamedNonFieldParameter/script: hasOnlyUnrelatedMessages
-front_end/PrivateNamedParameterDuplicatePublicName/part_wrapped_script: hasOnlyUnrelatedMessages
-front_end/PrivateNamedParameterDuplicatePublicName/script: hasOnlyUnrelatedMessages
-front_end/PrivateNamedParameterWithoutPublicName/part_wrapped_script: hasOnlyUnrelatedMessages
-front_end/PrivateNamedParameterWithoutPublicName/script: hasOnlyUnrelatedMessages
-
# Can we do better?
_fe_analyzer_shared/ConstAndFinal/declaration3: hasOnlyUnrelatedMessages # maybe the parser should do better here - it seems it once did?
_fe_analyzer_shared/ConstAndFinal/declaration4: hasOnlyUnrelatedMessages # maybe the parser should do better here - it seems it once did?
```
```
The name of the file: pkg/front_end/messages.yaml
Insertions: 3, Deletions: 0.

@@ -1575,12 +1575,14 @@
pseudoSharedCode: PRIVATE_NAMED_NON_FIELD_PARAMETER
parameters: none
problemMessage: "A named parameter that doesn't refer to an instance variable can't start with an underscore ('_')."
+ experiments: private-named-parameters
script: |
void foo({int? _hello}) {}

PrivateNamedParameterWithoutPublicName:
parameters: none
problemMessage: "A private named parameter must have a corresponding public name."
+ experiments: private-named-parameters
script: |
class C {
int? _123;
@@ -1591,6 +1593,7 @@
parameters:
String name: the corresponding public name of private named parameter
problemMessage: "The corresponding public name '#name' is already the name of another parameter."
+ experiments: private-named-parameters
script: |
class C {
int? _x;
```

Change information

Commit message:
[private named parameters] Report collision between public name and other parameters in CFE.
Change-Id: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018
Reviewed-by: Johnni Winther <johnni...@google.com>
Commit-Queue: Bob Nystrom <rnys...@google.com>
Auto-Submit: Bob Nystrom <rnys...@google.com>
Files:
  • M pkg/front_end/lib/src/codes/cfe_codes_generated.dart
  • M pkg/front_end/lib/src/source/outline_builder.dart
  • M pkg/front_end/messages.status
  • M pkg/front_end/messages.yaml
  • M pkg/front_end/test/spell_checking_list_common.txt
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart.strong.expect
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart.strong.modular.expect
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart.strong.outline.expect
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart.strong.transformed.expect
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart.textual_outline.expect
  • A pkg/front_end/testcases/private_named_parameters/initializing_formal_collision.dart.textual_outline_modelled.expect
Change size: L
Delta: 12 files changed, 843 insertions(+), 11 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Johnni Winther
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: I4a3260b3bc280b6a7fb202c16e2b1ee862bfc018
Gerrit-Change-Number: 465461
Gerrit-PatchSet: 6
Gerrit-Owner: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Bob Nystrom <rnys...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages