Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Method appears in method delcaration #4165

Closed
DanTup opened this issue Sep 21, 2022 · 1 comment
Closed

Extract Method appears in method delcaration #4165

DanTup opened this issue Sep 21, 2022 · 1 comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Sep 21, 2022

int test() => 42;

Putting the caret before the parameter list shows Extract Method:

Screenshot 2022-09-21 at 11 10 44

This doesn't occur when not at the parameter list, and if invoked it generates bad code:

int testnewMethod

newMethod() => 42;;

(this doesn't seem related to the other parameter list issues discussed in #4157 as this occurs in 2.18 too).

@DanTup DanTup added is bug in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server labels Sep 21, 2022
@DanTup DanTup added this to the v3.50.0 milestone Sep 21, 2022
@DanTup DanTup modified the milestones: v3.50.0, v3.52.0 Oct 3, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Oct 3, 2022
…nction declarations

Fixes Dart-Code/Dart-Code#4165.

Change-Id: I799220fffabfa39af1b2fd3039cb2de903f90c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262348
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member Author

DanTup commented Oct 5, 2022

Fixed by dart-lang/sdk@8941837.

@DanTup DanTup closed this as completed Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug
Projects
None yet
Development

No branches or pull requests

1 participant