TypeScript Version: 3.3.0-dev.20190108
Search Terms: noimplicitany infer code fix codefix token end is child end
Code
function wrap(arr) {
arr.sort(function (a: number, b: number) { return a < b ? -1 : 1 })
}
Expected behavior:
--noImplicitAny suggested fix on the arr parameter shouldn't crash.
There is no crash if you remove the function passed to .sort.
Actual behavior:
Error: Debug Failure. False expression: Token end is child end
at processChildNode (C:\Code\typestat\node_modules\typescript\lib\typescript.js:106787:34)
at C:\Code\typestat\node_modules\typescript\lib\typescript.js:106734:21
at visitNode (C:\Code\typestat\node_modules\typescript\lib\typescript.js:16135:24)
at Object.forEachChild (C:\Code\typestat\node_modules\typescript\lib\typescript.js:16306:24)
at processNode (C:\Code\typestat\node_modules\typescript\lib\typescript.js:106733:20)
at processChildNode (C:\Code\typestat\node_modules\typescript\lib\typescript.js:106793:21)
at processChildNodes (C:\Code\typestat\node_modules\typescript\lib\typescript.js:106844:48)
at C:\Code\typestat\node_modules\typescript\lib\typescript.js:106736:21
at visitNodes (C:\Code\typestat\node_modules\typescript\lib\typescript.js:16140:24)
at Object.forEachChild (C:\Code\typestat\node_modules\typescript\lib\typescript.js:16282:24)
Related Issues: Perhaps the same as #23942, but on the 1/8 nightly.
TypeScript Version: 3.3.0-dev.20190108
Search Terms: noimplicitany infer code fix codefix token end is child end
Code
Expected behavior:
--noImplicitAnysuggested fix on thearrparameter shouldn't crash.There is no crash if you remove the
functionpassed to.sort.Actual behavior:
Related Issues: Perhaps the same as #23942, but on the 1/8 nightly.