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.
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.
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
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