-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Self-referencing spread recursive loop #12808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
|
Oops, this fixes #12735. I got the bug number wrong initially. |
@sandersn please port this change to release-2.1 as well. |
Ok, I ported it. |
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
checkExpression
incheckSpreadExpression
, notcheckExpressionCached
.checkExpressionCached
ignores ongoing control flow analysis, which causes the following loop to make the compiler recur infinitely:An alternate fix would make
checkExpressionCached
not ignore control flow analysis in some situations, but that's a much more complicated fix, I think. @ahejlsberg, do you have an opinion on whether that or some other fix is feasible?