-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bug
Milestone
Description
Describe the bug
Using the refactor feature to convert a getter to a method doesn't work if said getter is part of an extension.
To Reproduce
Steps to reproduce the behavior:
- Add a getter to an extension
- Right click getter name -> Refactor -> Convert Getter to Method
Expected behavior
Getter should be changed to a method.
Example:
enum Category {
metal,
wood,
glass,
}
extension ExtraEnumFuntionality on Category {
String get someValue => 'returnValue'; // FAIL
}
class SomeClass {
String get aValue => 'aReturnValue'; // SUCCESS
}
extension ExtraClassFunctionality on SomeClass {
String get someValue => 'returnValue'; // FAIL
}Versions (please complete the following information):
- VS Code version: 1.64.2
- Dart extension version: 3.34.0
- Dart/Flutter SDK version: Flutter 2.11.0-0.1.pre, Dart 2.17.0
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bug