Skip to content

[4.2][Serialization] Allow unbound generic types to cross-reference typeal… #16788

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
May 23, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 23, 2018

…ias decls

Ideally UnboundGenericType should never be serialized but it is
currently allowed to make generic typealias declarations without
specifying generic parameters, so it should be allowed to cross
reference typealias decls in such types as well because NameAliasType
can't be used until generic parameters are resolved.

This is only a temporary fix and more comprehensive solution is still
pending here, most likely such declarations should not produce
UnboundGenericType but instead should copy generic parameters from
underlying type and produce proper NameAliasType.

Resolves: rdar://problem/37384120
(cherry picked from commit 7ed3d75)

…ias decls

Ideally `UnboundGenericType` should never be serialized but it is
currently allowed to make generic `typealias` declarations without
specifying generic parameters, so it should be allowed to cross
reference typealias decls in such types as well because `NameAliasType`
can't be used until generic parameters are resolved.

This is only a temporary fix and more comprehensive solution is still
pending here, most likely such declarations should not produce
`UnboundGenericType` but instead should copy generic parameters from
underlying type and produce proper `NameAliasType`.

Resolves: rdar://problem/37384120
(cherry picked from commit 7ed3d75)
@xedin xedin changed the title [Serialization] Allow unbound generic types to cross-reference typeal… [4.2][Serialization] Allow unbound generic types to cross-reference typeal… May 23, 2018
@xedin
Copy link
Contributor Author

xedin commented May 23, 2018

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented May 23, 2018

@swift-ci please test source compatibility

@xedin xedin merged commit 327e410 into swiftlang:swift-4.2-branch May 23, 2018
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.

1 participant