Skip to content

Conversation

@pashaarshad
Copy link

Fixes #62436

Updates convert_field_formal_to_normal.dart and convert_to_normal_parameter.dart to properly handle private named parameters.

When converting this._foo to a normal parameter:

  • Uses the public name for the parameter (foo)
  • Preserves the private field name in the initializer (_foo = foo)
  • Only applies when private_named_parameters feature is enabled

Fixes dart-lang#62436

Updates convert_field_formal_to_normal.dart and convert_to_normal_parameter.dart
to properly handle private named parameters by using the public name for the
parameter declaration while preserving the private field name in the initializer.
@google-cla
Copy link

google-cla bot commented Jan 17, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mraleph
Copy link
Member

mraleph commented Jan 20, 2026

@pashaarshad you need to sign CLA, or we can't review the code.

@pashaarshad
Copy link
Author

@mraleph Thanks for the reminder. I’ll sign the Google CLA shortly.
Before proceeding, I just want to confirm how to create/sign the CLA and understand whether it’s safe to do so.
Could you please share the steps or a reference link?

@mraleph
Copy link
Member

mraleph commented Jan 21, 2026

@pashaarshad you can read and sign CLA here: https://cla.developers.google.com/

@copybara-service
Copy link

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/475120

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/475120 has been updated with the latest commits from this pull request.

@pashaarshad
Copy link
Author

@mraleph sir , now i have done the CLA ..................Now check the PR

@mraleph
Copy link
Member

mraleph commented Jan 23, 2026

I noticed that #62436 is already closed as fixed.

I think @munificent has already landed necessary changes?

@munificent munificent requested review from bwilkerson and removed request for bwilkerson January 23, 2026 23:08
@munificent
Copy link
Member

Sorry, @pashaarshad, I wasn't aware you were looking at this.

My change handles convert_field_formal_to_normal.dart which this PR also fixes. But this PR also handles convert_to_normal_parameter.dart, which I haven't gotten to yet. (There are so many of these assists and their names are so similar it's hard to keep track. :-/ )

@pashaarshad, do you want to rebase and remove your changes to convert_field_formal_to_normal.dart (and the test) but keep the changes to convert_to_normal_parameter.dart (and its test)?

Then ideally @bwilkerson or @scheglov would review it. Thank you for contributing to Dart!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update convert_field_formal_to_normal.dart to handle private named parameters

3 participants