Skip to content

Sema: Don't look through nested typealiases when checking for unsupported member reference #32761

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

Conversation

slavapestov
Copy link
Contributor

It appears that a long time ago, we didn't enforce that a member
reference to a typealias nested inside a generic type would supply
the generic arguments at all. To avoid breaking source compatibility,
we carved out some exceptions. Tighten up the exception to prohibit
the case where a typealias references another typealias, to fix a
crash.

While this worked in 5.1, it would crash in 5.2 and 5.3, and at
this point it's more trouble than it is worth to make it work
again, because of subtle representational issues. So let's just
ban it.

Fixes rdar://problem/63535194.

…rted member reference

It appears that a long time ago, we didn't enforce that a member
reference to a typealias nested inside a generic type would supply
the generic arguments at all. To avoid breaking source compatibility,
we carved out some exceptions. Tighten up the exception to prohibit
the case where a typealias references another typealias, to fix a
crash.

While this worked in 5.1, it would crash in 5.2 and 5.3, and at
this point it's more trouble than it is worth to make it work
again, because of subtle representational issues. So let's just
ban it.

Fixes <rdar://problem/63535194>.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

2 similar comments
@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit a689dd2 into swiftlang:master Jul 9, 2020
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