Uh oh!
There was an error while loading. Please reload this page.
Self-referencing spread recursive loop - #12808
Conversation
Not checkExpressionCached. checkExpressionCached ignores ongoing control
flow analysis, which causes the following loop to make the compiler
recur infinitely:
```ts
let a = []
for (const x of []) {
a = [...a]
}
```Does |
Nathan Shively-Sanders (sandersn)
commented
Dec 9, 2016
|
Oops, this fixes #12735. I got the bug number wrong initially. |
Mohamed Hegazy (mhegazy)
commented
Dec 12, 2016
Nathan Shively-Sanders (@sandersn) please port this change to release-2.1 as well. |
Ok, I ported it. |
Mohamed Hegazy (mhegazy)
commented
Dec 13, 2016
never mind. i have a port already up: #12864 |
Sorry, I didn't see it until after I pushed . I wondered why I did t have merge conflicts with the new commits... |
Fixes#12735
Use
checkExpressionincheckSpreadExpression, notcheckExpressionCached.checkExpressionCachedignores ongoing control flow analysis, which causes the following loop to make the compiler recur infinitely:An alternate fix would make
checkExpressionCachednot ignore control flow analysis in some situations, but that's a much more complicated fix, I think. Anders Hejlsberg (@ahejlsberg), do you have an opinion on whether that or some other fix is feasible?