Skip to content

Conversation

@ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Mar 10, 2020

One thing that immediately stands out in the stack trace for #31230 is that we're performing subtype reduction (removeSubtypes) on a union type during inference. We shouldn't be doing that, at least not without recursion limiters in place, because subtype reduction checks relations, which may perform inference, and off we go. It appears that removing the UnionReduction.Subtype flag where we construct a union type in getImplicitIndexTypeOfType fixes the issue.

Fixes #31230.

@ahejlsberg ahejlsberg requested review from orta and weswigham March 10, 2020 18:25
@ahejlsberg
Copy link
Member Author

@typescript-bot run dt
@typescript-bot test this
@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2020

Heya @ahejlsberg, I've started to run the extended test suite on this PR at ef03050. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2020

Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at ef03050. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 10, 2020

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at ef03050. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

Copy link
Contributor

@orta orta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for looking into it!

@ahejlsberg ahejlsberg merged commit b78ef30 into master Mar 11, 2020
@nodkz
Copy link

nodkz commented Mar 11, 2020

@ahejlsberg thanks a lot 🙏

@jakebailey jakebailey deleted the fix31230 branch November 7, 2022 17:35
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TSC fails] RangeError: Maximum call stack size exceeded [with repro repo]

6 participants