[L] Change in dart/sdk[main]: [analysis_server] Keep declaring final and var

0 views
Skip to first unread message

Chitresh Yadav (csy) (Gerrit)

unread,
11:54 AM (4 hours ago) 11:54 AM
to Samuel Rawlins, bwilk...@google.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Chitresh Yadav (csy) has uploaded change 570160 for review

Chitresh Yadav (csy) <csy24...@gmail.com> would like Samuel Rawlins to review this change.

Commit message

[analysis_server] Keep declaring final and var

The function-type syntax fix dropped `final` and `var`, so a
primary-constructor declaring parameter became an ordinary parameter
and the field disappeared.

Closes https://github.com/dart-lang/sdk/issues/64597

R=bwilk...@google.com, sraw...@google.com
Change-Id: Iea3d313ad564b15f45c6813f86520376c3ef15f7

Change information

Files:
  • M pkg/analysis_server/lib/src/services/correction/dart/convert_to_generic_function_syntax.dart
  • M pkg/analysis_server/test/src/services/correction/assist/convert_into_generic_function_syntax_test.dart
  • M pkg/analysis_server/test/src/services/correction/fix/convert_to_generic_function_syntax_test.dart
Change size: L
Delta: 3 files changed, 252 insertions(+), 2 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • 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: newchange
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iea3d313ad564b15f45c6813f86520376c3ef15f7
Gerrit-Change-Number: 570160
Gerrit-PatchSet: 1
Gerrit-Owner: Chitresh Yadav (csy) <csy24...@gmail.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
2:42 PM (2 hours ago) 2:42 PM
to Chitresh Yadav (csy), dart-...@luci-project-accounts.iam.gserviceaccount.com, Samuel Rawlins, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Chitresh Yadav (csy)

Brian Wilkerson added 1 comment on change 570160

File pkg/analysis_server/test/src/services/correction/assist/convert_into_generic_function_syntax_test.dart
Line 72, Patchset 1 (Latest): Future<void> test_functionTypedParameter_declaring_final() async {
Brian Wilkerson . unresolved

Please add a test case of the form
```dart
int _zero(String _) => 0;

class C({final int f(String s) = _zero}) {}
```

I believe the correct result would be

```dart
int _zero(String _) => 0;

class C({final int Function(String s) f = _zero}) {}
```

But I think the test will fail. (Happy to be proven wrong.)

Open in Gerrit

Related details

Attention is currently required from:
  • Chitresh Yadav (csy)
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: Iea3d313ad564b15f45c6813f86520376c3ef15f7
Gerrit-Change-Number: 570160
Gerrit-PatchSet: 1
Gerrit-Owner: Chitresh Yadav (csy) <csy24...@gmail.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-Attention: Chitresh Yadav (csy) <csy24...@gmail.com>
Gerrit-Comment-Date: Tue, 27 Oct 2026 18:42:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages