Skip to content
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

Update Sema cast checks for subclass existentials... and more! #8876

Merged

Conversation

slavapestov
Copy link
Member

@slavapestov
Copy link
Member Author

@swift-ci Please smoke test

@slavapestov
Copy link
Member Author

apple/swift-lldb#188

@swift-ci smoke test Linux

Normally there is very little the type checker can conclude about
casts between existentials, because new conformances can be added
retroactively. However if the existentials are class-constrained,
we can rule out certain casts as always failing by looking at
superclass bounds.
…asses

We would misreport a cast from G<T> to G<Int> or vice versa
as always failing, because we were checking for an exact
subtype relationship instead of archetype binding.

Fixes <https://bugs.swift.org/browse/SR-3609>.
@slavapestov slavapestov force-pushed the subclass-existentials-sema-casts branch from b72bde4 to 191afb0 Compare April 20, 2017 07:38
@slavapestov
Copy link
Member Author

apple/swift-lldb#188

@swift-ci smoke test Linux

@slavapestov
Copy link
Member Author

apple/swift-lldb#188

@swift-ci smoke test

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.

None yet

1 participant