Error span causes refactoring suggestions #34481
Labels
bug
Issue identified by VS Code Team member as probable bug
typescript
Typescript support issues
verified
Verification succeeded
Milestone
TypeScript Version: nightly (2.6.0-dev.20170915)
Moving from microsoft/TypeScript#18507 as this looks like a vscode issue.
Code
The entire
return
statement has a red squiggly line under it.Click anywhere in the error span and there will be a suggestion to refactor to an inner function.
Remove
: number
and there are no refactoring suggestions.(Tested in vscode.)
Expected behavior:
Presence of a compile error doesn't cause a refactoring to be suggested.
Especially because it looks exactly like a code fix, but extracting to an inner function won't fix the compile error.
Actual behavior:
It does.
In fact, hovering over the light bulb shows "Show Fixes", but this is a refactoring, not a fix.
The text was updated successfully, but these errors were encountered: