[dart-lang/sdk] 2568d6: [analysis_server] Update create_method to handle e...

0 views
Skip to first unread message

Danny Tuppeny

unread,
Apr 2, 2026, 4:09:24 PM (yesterday) Apr 2
to com...@dartlang.org
Branch: refs/heads/main
Home: https://github.com/dart-lang/sdk
Commit: 2568d6938bc63201d076b29f7251b60d82322dda
https://github.com/dart-lang/sdk/commit/2568d6938bc63201d076b29f7251b60d82322dda
Author: Danny Tuppeny <da...@tuppeny.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart
M pkg/analysis_server/test/src/services/correction/fix/create_method_test.dart

Log Message:
-----------
[analysis_server] Update create_method to handle empty bodies

These tests appear to span both create_method.dart and create_method_or_function.dart, but there are no changes to create_method.dart because it always uses `insertMethod` that was already updated in a previous CL.

`create_method_or_function.dart` did not use `insertMethod`, but this updates it to (for methods).

Fixes https://github.com/dart-lang/sdk/issues/63054
Fixes https://github.com/dart-lang/sdk/issues/63055

Change-Id: I6304bbe4daa629739f3fa60672d4a96576c7eb6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492240
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Keerti Parthasarathy <kee...@google.com>
Commit-Queue: Brian Wilkerson <brianwi...@google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/dart-lang/sdk/settings/notifications

Danny Tuppeny

unread,
Apr 2, 2026, 4:59:28 PM (yesterday) Apr 2
to com...@dartlang.org
Branch: refs/heads/lkgr

copybara-service[bot]

unread,
Apr 2, 2026, 8:06:20 PM (22 hours ago) Apr 2
to com...@dartlang.org
Branch: refs/heads/dev
Home: https://github.com/dart-lang/sdk
Commit: 2568d6938bc63201d076b29f7251b60d82322dda
https://github.com/dart-lang/sdk/commit/2568d6938bc63201d076b29f7251b60d82322dda
Author: Danny Tuppeny <da...@tuppeny.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart
M pkg/analysis_server/test/src/services/correction/fix/create_method_test.dart

Log Message:
-----------
[analysis_server] Update create_method to handle empty bodies

These tests appear to span both create_method.dart and create_method_or_function.dart, but there are no changes to create_method.dart because it always uses `insertMethod` that was already updated in a previous CL.

`create_method_or_function.dart` did not use `insertMethod`, but this updates it to (for methods).

Fixes https://github.com/dart-lang/sdk/issues/63054
Fixes https://github.com/dart-lang/sdk/issues/63055

Change-Id: I6304bbe4daa629739f3fa60672d4a96576c7eb6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492240
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Keerti Parthasarathy <kee...@google.com>
Commit-Queue: Brian Wilkerson <brianwi...@google.com>


Commit: 4f3f25269ce5478d629287c430adecbfaa1b009b
https://github.com/dart-lang/sdk/commit/4f3f25269ce5478d629287c430adecbfaa1b009b
Author: Paul Berry <paul...@google.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
A pkg/_fe_analyzer_shared/lib/src/type_inference/body_inference_context.dart
M pkg/_fe_analyzer_shared/lib/src/type_inference/type_analysis_result.dart
M pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart
M pkg/_fe_analyzer_shared/test/mini_ast.dart
M pkg/_fe_analyzer_shared/test/type_inference/type_inference_test.dart
M pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
M pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
M pkg/analyzer/lib/src/generated/resolver.dart
M pkg/front_end/lib/src/type_inference/closure_context.dart
M pkg/front_end/lib/src/type_inference/inference_visitor.dart

Log Message:
-----------
[_fe_analyzer_shared] Move analysis of yield statements to shared logic.

Moves some of the business logic for type analyzing yield statements
from the analyzer and front_end codebases into the shared
`TypeAnalyzer` class. There is no functional change.

This paves the way for fixing
https://github.com/dart-lang/sdk/issues/62889 (Unsound type promotion
in inner async/generator functions), which will require the type
analysis of yield statements to be integrated more closely with flow
analysis. Sharing the type analysis logic will avoid the need to do
that integration twice.

Change-Id: I36c1f5e45e33d9e46dc934fb71bc634d6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491260
Reviewed-by: Konstantin Shcheglov <sche...@google.com>
Commit-Queue: Paul Berry <paul...@google.com>


Commit: 931a3ff671385b0495045935004306dc4a870a63
https://github.com/dart-lang/sdk/commit/931a3ff671385b0495045935004306dc4a870a63
Author: Danny Tuppeny <da...@tuppeny.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/analysis_server/lib/src/services/completion/dart/candidate_suggestion.dart
M pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
M pkg/analysis_server/test/lsp/completion_dart_test.dart
M pkg/analysis_server/test/services/completion/dart/declaration/local_library_test.dart
M pkg/analysis_server/test/services/completion/dart/declaration/local_reference_test.dart

Log Message:
-----------
[analysis_server] Fix type name for constructors from type aliases in completion

We were adding constructors to completion for type aliases, but not using the type alias in the completion, which mean a lot of duplicates against the target class (see https://github.com/Dart-Code/Dart-Code/issues/6003).

I don't know if this got lost in one of the completion refactors, as there didn't seem to be support in `ConstructorSuggestion` for this, so I've added an `alias` field to it to override the name.

Fixes https://github.com/Dart-Code/Dart-Code/issues/6003

Change-Id: I06c073b1a9cae012c5bdf0fb8a3aa22f8fed728c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491880
Commit-Queue: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Keerti Parthasarathy <kee...@google.com>


Commit: adefb1050e465ebd82cba3758d862a9e7a91d759
https://github.com/dart-lang/sdk/commit/adefb1050e465ebd82cba3758d862a9e7a91d759
Author: Danny Tuppeny <da...@tuppeny.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/analysis_server/lib/src/services/correction/dart/create_no_such_method.dart
M pkg/analysis_server/test/src/services/correction/fix/create_no_such_method_test.dart

Log Message:
-----------
[analysis_server] Handle empty bodies in create_no_such_method

Fixes https://github.com/dart-lang/sdk/issues/63057

Change-Id: I07d2c097edab70b88ee69ed02d080ee5118a5169
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492460
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Commit-Queue: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Samuel Rawlins <sraw...@google.com>


Commit: b43eb3883398d7b1f7978e953e701e9457840b7c
https://github.com/dart-lang/sdk/commit/b43eb3883398d7b1f7978e953e701e9457840b7c
Author: Danny Tuppeny <da...@tuppeny.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/analysis_server/lib/src/services/correction/dart/add_enum_constant.dart
M pkg/analysis_server/test/src/services/correction/assist/convert_class_to_enum_test.dart
M pkg/analysis_server/test/src/services/correction/fix/add_enum_constant_test.dart

Log Message:
-----------
[analysis_server] Add tests for convert_class_to_enum and add_enum_constant with empty bodies

Fixes https://github.com/dart-lang/sdk/issues/63028
Fixes https://github.com/dart-lang/sdk/issues/63036

Change-Id: I18396adddcf03f6d7b3d36a41ad44e9236a2fde2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492440
Commit-Queue: Keerti Parthasarathy <kee...@google.com>
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Keerti Parthasarathy <kee...@google.com>


Commit: d554776a6431f263549cf7cee36edff77bec1925
https://github.com/dart-lang/sdk/commit/d554776a6431f263549cf7cee36edff77bec1925
Author: Brian Wilkerson <brianwi...@google.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/linter/test/rules/avoid_redundant_argument_values_test.dart

Log Message:
-----------
Test that avoid_redundant_argument_values works with primary constructors

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

Change-Id: I061481347a6b7080815d6441bdd762faf33c57bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492620
Commit-Queue: Brian Wilkerson <brianwi...@google.com>
Reviewed-by: Samuel Rawlins <sraw...@google.com>


Commit: cc1a9a19219f7107cdb11172b4cb69301b31c327
https://github.com/dart-lang/sdk/commit/cc1a9a19219f7107cdb11172b4cb69301b31c327
Author: Danny Tuppeny <da...@tuppeny.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
M pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateless_widget_test.dart

Log Message:
-----------
[analysis_server] Add tests for Flutter convert widget tests with empty bodies

Fixes https://github.com/dart-lang/sdk/issues/63063
Fixes https://github.com/dart-lang/sdk/issues/63064

Change-Id: I8cafe928a95060e435a465dd7fc93a241ee1872e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492420
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Commit-Queue: Keerti Parthasarathy <kee...@google.com>
Reviewed-by: Keerti Parthasarathy <kee...@google.com>


Commit: 3d7c181ea46c2232b7ef47450d80094dfc9af43f
https://github.com/dart-lang/sdk/commit/3d7c181ea46c2232b7ef47450d80094dfc9af43f
Author: Jake Macdonald <jak...@google.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M DEPS

Log Message:
-----------
Bump ai to f1cddc8e1905b9a5753a93ce451522e564311251

Changes:
```
> git log --format="%C(auto) %h %s" 325fe27..f1cddc8
https://dart.googlesource.com/ai.git/+/f1cddc8 Add support for custom tool metrics, implement some for analyzer tools (423)
https://dart.googlesource.com/ai.git/+/4bc6fd7 Bump the github-actions group with 2 updates (421)
https://dart.googlesource.com/ai.git/+/a5ed11e Add `listDtdUris` command to the DTD tool, drop auto DTD connection logic. (418)
https://dart.googlesource.com/ai.git/+/e637e7f [dart_mcp_server] flutter_driver: expose set_frame_sync command (392)
https://dart.googlesource.com/ai.git/+/62370cb enable the set_semantics flutter driver command (415)

```

Diff: https://dart.googlesource.com/ai.git/+/325fe27f493a64ae82b39ac32a0d2de7354477cd..f1cddc8e1905b9a5753a93ce451522e564311251/
Change-Id: Ifda04580915ef7740f0abbedb2aacb10bd505426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/492700
Auto-Submit: Jake Macdonald <jak...@google.com>
Reviewed-by: Paul Berry <paul...@google.com>
Commit-Queue: Jake Macdonald <jak...@google.com>
Commit-Queue: Paul Berry <paul...@google.com>


Commit: 89da5e82b9e77238f821b9745a22864e2660f113
https://github.com/dart-lang/sdk/commit/89da5e82b9e77238f821b9745a22864e2660f113
Author: Sam Rawlins <sraw...@google.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M pkg/linter/test/rules/always_put_required_named_parameters_first_test.dart

Log Message:
-----------
linter: Test that always_put_required_named_parameters_first supports primary constructors

Fixes https://github.com/dart-lang/sdk/issues/62574

Change-Id: I45c442efb82aeacee8a8422666304f2f5b476657
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477763
Commit-Queue: Samuel Rawlins <sraw...@google.com>
Reviewed-by: Brian Wilkerson <brianwi...@google.com>


Commit: 3c7a79045b8b0df6277888b712df6a14c13ccfdf
https://github.com/dart-lang/sdk/commit/3c7a79045b8b0df6277888b712df6a14c13ccfdf
Author: Dart CI <dart-inte...@dart-ci-internal.iam.gserviceaccount.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)

Changed paths:
M DEPS
A pkg/_fe_analyzer_shared/lib/src/type_inference/body_inference_context.dart
M pkg/_fe_analyzer_shared/lib/src/type_inference/type_analysis_result.dart
M pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart
M pkg/_fe_analyzer_shared/test/mini_ast.dart
M pkg/_fe_analyzer_shared/test/type_inference/type_inference_test.dart
M pkg/analysis_server/lib/src/services/completion/dart/candidate_suggestion.dart
M pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
M pkg/analysis_server/lib/src/services/correction/dart/add_enum_constant.dart
M pkg/analysis_server/lib/src/services/correction/dart/create_method_or_function.dart
M pkg/analysis_server/lib/src/services/correction/dart/create_no_such_method.dart
M pkg/analysis_server/test/lsp/completion_dart_test.dart
M pkg/analysis_server/test/services/completion/dart/declaration/local_library_test.dart
M pkg/analysis_server/test/services/completion/dart/declaration/local_reference_test.dart
M pkg/analysis_server/test/src/services/correction/assist/convert_class_to_enum_test.dart
M pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateful_widget_test.dart
M pkg/analysis_server/test/src/services/correction/assist/flutter_convert_to_stateless_widget_test.dart
M pkg/analysis_server/test/src/services/correction/fix/add_enum_constant_test.dart
M pkg/analysis_server/test/src/services/correction/fix/create_method_test.dart
M pkg/analysis_server/test/src/services/correction/fix/create_no_such_method_test.dart
M pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
M pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
M pkg/analyzer/lib/src/generated/resolver.dart
M pkg/front_end/lib/src/type_inference/closure_context.dart
M pkg/front_end/lib/src/type_inference/inference_visitor.dart
M pkg/linter/test/rules/always_put_required_named_parameters_first_test.dart
M pkg/linter/test/rules/avoid_redundant_argument_values_test.dart
M tools/VERSION

Log Message:
-----------
Version 3.12.0-315.0.dev

Merge 89da5e82b9e77238f821b9745a22864e2660f113 into dev


Compare: https://github.com/dart-lang/sdk/compare/892795f67640...3c7a79045b8b

copybara-service[bot]

unread,
Apr 2, 2026, 8:46:08 PM (21 hours ago) Apr 2
to com...@dartlang.org
Branch: refs/heads/lkgr-dev
Reply all
Reply to author
Forward
0 new messages