Open davkean opened 4 years ago
I would prefer to be left with invalid code than not to be offered this refactoring.
I'd definitely like this. Perhaps allow EM, but with a warning that we went be able to preserve semantics.
This has been a long-standing request/deficiency here.
cc @ryzngard
Version Used:
Version 16.8.0 Preview 3.0 [30425.163.main]
Steps to Reproduce:
Highlight between the $$$ and CTRL+.
The exact code is here: https://github.com/dotnet/project-system/blob/b450eb548e2ff1f7e94e9b5f392590ad15886957/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Rename/RenamerProjectTreeActionHandler.cs#L112-L123.
Expected Behavior: To be offerred to Extract Method/Extract Local Function
Actual Behavior: No refactorings, if I remove the bottom
if
from the selection then I'm offered the fix.