You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compiler exception: "Too many nodes written to output" #12961
// A *self-contained* demonstration of the problem follows...exportclassTest{constructor(){letouterArray: Array<number>=[1,2,3];letinnerArray: Array<number>=[1,2,3];for(letouterofouterArray)for(letinnerofinnerArray){this.aFunction((newValue,oldValue)=>{console.log(`${outer}${inner}${newValue}`);});}}publicaFunction(func: (newValue: any,oldValue: any)=>void): void{}}
Actual behavior:
The typescript compiler (tsc.exe) fails on an assertion, throwing the following exception:
Error: Debug Failure. False expression: Too many nodes written to output.
at Object.assert (...\npm\node_modules\typescript\lib\tsc.js:1794:23)
at extractSingleNode (...\npm\node_modules\typescript\lib\tsc.js:37059:15)
at Object.visitNode (...\npm\node_modules\typescript\lib\tsc.js:36736:54)
at convertIterationStatementBodyIfNecessary (...\npm\node_modules\typescript\lib\tsc.js:41071:31)
at visitForOfStatement (...\npm\node_modules\typescript\lib\tsc.js:40912:20)
at visitJavaScript (...\npm\node_modules\typescript\lib\tsc.js:40185:28)
at visitorWorker (...\npm\node_modules\typescript\lib\tsc.js:40113:24)
at dispatcher (...\npm\node_modules\typescript\lib\tsc.js:40034:19)
at saveStateAndInvoke (...\npm\node_modules\typescript\lib\tsc.js:40052:27)
at visitor (...\npm\node_modules\typescript\lib\tsc.js:40029:20)
Activity
dkent600 commentedon Dec 15, 2016
Error goes away if you set "target" to "es6"
[-]compile error: "Too many nodes written to output"[/-][+]compiler exception: "Too many nodes written to output"[/+]dkent600 commentedon Dec 15, 2016
Error also goes away if you use regular javascript
forloops, like:This is a work-around