Skip to content

Commit

Permalink
Elements. Migrate MoveTypeArgumentsToClass.
Browse files Browse the repository at this point in the history
Change-Id: I49e1a6f69e84eea75861cbf396660962066eedf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387408
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
  • Loading branch information
scheglov authored and Commit Queue committed Sep 30, 2024
1 parent e08518f commit a11815d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/analysis_server/analyzer_use_new_elements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ lib/src/services/correction/dart/make_variable_not_final.dart
lib/src/services/correction/dart/make_variable_nullable.dart
lib/src/services/correction/dart/move_annotation_to_library_directive.dart
lib/src/services/correction/dart/move_doc_comment_to_library_directive.dart
lib/src/services/correction/dart/move_type_arguments_to_class.dart
lib/src/services/correction/dart/organize_imports.dart
lib/src/services/correction/dart/qualify_reference.dart
lib/src/services/correction/dart/remove_abstract.dart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class MoveTypeArgumentsToClass extends ResolvedCorrectionProducer {

var type = namedType.typeOrThrow;
if (type is InterfaceType) {
var element = type.element;
if (element.typeParameters.length == typeArguments.arguments.length) {
var element = type.element3;
if (element.typeParameters2.length == typeArguments.arguments.length) {
await builder.addDartFileEdit(file, (builder) {
var argumentText = utils.getNodeText(typeArguments);
builder.addSimpleInsertion(namedType.end, argumentText);
Expand Down

0 comments on commit a11815d

Please sign in to comment.