-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.7.0-insiders.20180117
VSCode Version: 1.20.0-insider
Exception in convertToImportCodeFixContext when the TS extension runs getCodeFixes.
Repro Steps:
- Open a new TS file with the following content:
const x = y;- Ensure the Output Pane is open with the TypeScript extension output selected.
- Select the contents of the entire file (e.g. Ctrl+A on Windows)
- Comment the selected range (e.g. Ctrl+/ on Windows)
Expected Behavior:
No output to extension log.
Actual Behavior:
The following is output to the extension log:
Error: Debug Failure. Invalid cast. The supplied value did not pass the test 'isIdentifier'.
at Object.cast (c:\dev\TypeScript\built\local\tsserver.js:2445:15)
at convertToImportCodeFixContext (c:\dev\TypeScript\built\local\tsserver.js:78598:34)
at Object.getImportCodeActions [as getCodeActions] (c:\dev\TypeScript\built\local\tsserver.js:79002:36)
at c:\dev\TypeScript\built\local\tsserver.js:77474:33
at Object.forEach (c:\dev\TypeScript\built\local\tsserver.js:1430:30)
at Object.getFixes (c:\dev\TypeScript\built\local\tsserver.js:77473:16)
at c:\dev\TypeScript\built\local\tsserver.js:83621:35
at Object.flatMap (c:\dev\TypeScript\built\local\tsserver.js:1700:25)
at Object.getCodeFixesAtPosition (c:\dev\TypeScript\built\local\tsserver.js:83619:23)
at IOSession.Session.getCodeFixes (c:\dev\TypeScript\built\local\tsserver.js:90643:64)
at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (c:\dev\TypeScript\built\local\tsserver.js:89547:61)
at c:\dev\TypeScript\built\local\tsserver.js:90808:88
at IOSession.Session.executeWithRequestId (c:\dev\TypeScript\built\local\tsserver.js:90799:28)
at IOSession.Session.executeCommand (c:\dev\TypeScript\built\local\tsserver.js:90808:33)
at IOSession.Session.onMessage (c:\dev\TypeScript\built\local\tsserver.js:90828:35)
at Interface.<anonymous> (c:\dev\TypeScript\built\local\tsserver.js:92029:27)
at emitOne (events.js:96:13)
at Interface.emit (events.js:191:7)
at Interface._onLine (readline.js:241:10)
at Interface._normalWrite (readline.js:384:12)
at Socket.ondata (readline.js:101:10)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20)
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue