Skip to content

Opportunistic fix to allow \Derived.property to be inferred as \Base.… #15903

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
Apr 12, 2018
Merged

Opportunistic fix to allow \Derived.property to be inferred as \Base.… #15903

merged 1 commit into from
Apr 12, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Apr 12, 2018

…property.

Noticed this opportunity while reading through the keypath type checking code.

…property.

Noticed this opportunity while reading through the keypath type checking code.
@rudkx
Copy link
Contributor Author

rudkx commented Apr 12, 2018

@jckarter I'm not sure if this is really useful/desirable. The diagnostic in the second case could certainly be more helpful, but that would probably not be straightforward to fix.

What do you think?

@jrose-apple
Copy link
Contributor

This seems a little funny, but it's useful for source compatibility. If a third-party developer refactors their published library to move common functionality into a superclass, that shouldn't break source.

@jckarter
Copy link
Contributor

It seems reasonable to me for this to work.

@rudkx
Copy link
Contributor Author

rudkx commented Apr 12, 2018

@swift-ci Please smoke test

@rudkx rudkx merged commit 9bc76a7 into swiftlang:master Apr 12, 2018
@rudkx rudkx deleted the keypath-fixes branch April 12, 2018 22:23
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