Skip to content

[Type checker] Don't substitute into unresolved types. #18202

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

Merged
merged 1 commit into from
Jul 25, 2018

Conversation

DougGregor
Copy link
Member

Unresolved types are formed in a few specific places within the type
checker's recovery path; don't let them bleed into the substitution
logic. Fixes rdar://problem/42448618.

Unresolved types are formed in a few specific places within the type
checker's recovery path; don't let them bleed into the substitution
logic. Fixes rdar://problem/42448618.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@slavapestov
Copy link
Contributor

This looks like a workaround. What's the actual problem?

@slavapestov
Copy link
Contributor

I see, we're building a new generic signature because getTypeOfMember() calls subst() on a GenericFunctionType. Should it really be doing that?

@DougGregor
Copy link
Member Author

subst() on a GenericFunctionType is defined, but probably generally a bad idea. UnresolvedType is the real issue here; anywhere it leaks into the substitution machinery we risk hitting this problem.

@swift-ci swift-ci merged commit 23acb96 into swiftlang:master Jul 25, 2018
@DougGregor DougGregor deleted the no-subst-unresolved-type branch July 25, 2018 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants