Skip to content

Delay signature return type instantiation#16335

Merged
sandersn merged 3 commits into
masterfrom
delay-signature-return-type-instantiation
Jun 8, 2017
Merged

Delay signature return type instantiation#16335
sandersn merged 3 commits into
masterfrom
delay-signature-return-type-instantiation

Conversation

@sandersn
Copy link
Copy Markdown
Member

@sandersn sandersn commented Jun 7, 2017

Delay instantiation of signature return type getReturnTypeOfSignature correctly handles an un-instantiated signature, but instantiateSignature used to eagerly instantiate the return type. This caused an infinite recursion in #16233.

Now instantiateSignature doesn't instantiate the return type, but relies on getReturnTypeOfSignature to do it.

Fixes #16233

sandersn added 2 commits June 7, 2017 12:58
`getReturnTypeOfSignature` correctly handles an un-instantiated
signature, but `instantiateSignature` used to eagerly instantiate the
return type. This caused an infinite recursion in #16233.

Now `instantiateSignature` doesn't instantiate the return type, but
relies on `getReturnTypeOfSignature` to do it.
@sandersn
Copy link
Copy Markdown
Member Author

sandersn commented Jun 7, 2017

@ahejlsberg it turns out the machinery was completely in place already. instantiateSignature just needed to skip instantiating the return type.

@sandersn
Copy link
Copy Markdown
Member Author

sandersn commented Jun 8, 2017

CI failed because of lint in master that is now fixed. I'll merge from master.

@sandersn sandersn merged commit b94c513 into master Jun 8, 2017
@sandersn sandersn deleted the delay-signature-return-type-instantiation branch June 8, 2017 16:59
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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.

4 participants