Skip to content

Limit deep generic type instantiations#15011

Merged
ahejlsberg merged 3 commits into
masterfrom
limitDeepInstantiations
Apr 5, 2017
Merged

Limit deep generic type instantiations#15011
ahejlsberg merged 3 commits into
masterfrom
limitDeepInstantiations

Conversation

@ahejlsberg
Copy link
Copy Markdown
Member

With this PR we limit recursive invocations of getTypeOfInstantiatedSymbol to a maximum depth of 100, at which point we report the error "Generic type instantiation is excessively deep and possibly infinite."

This PR also fixes an issue where constraints weren't checked for for invalid instantiations of indexed access types.

Fixes #14837.

@aozgaa aozgaa mentioned this pull request Apr 4, 2017
@ahejlsberg ahejlsberg merged commit 9d2b57a into master Apr 5, 2017
@ahejlsberg ahejlsberg deleted the limitDeepInstantiations branch April 5, 2017 03:28
@microsoft microsoft locked and limited conversation to collaborators Jun 21, 2018
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.

stack overflow in recursive type alias + lookup type

3 participants