Skip to content

Sema: Fix 'super' calls from methods returning 'Self' [3.1] #7914

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

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Mar 5, 2017

We have a quirk where TypeBase::getSuperclass() on DynamicSelfType
returns the underlying class type, and not the superclass of the
underlying class type. As a result, we would emit a SuperRefExpr
whose type was the type of 'self' and not the type of 'super'.

Fixes rdar://problem/30853768 and rdar://problem/30834916.

We have a quirk where TypeBase::getSuperclass() on DynamicSelfType
returns the underlying class type, and not the superclass of the
underlying class type. As a result, we would emit a SuperRefExpr
whose type was the type of 'self' and not the type of 'super'.

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

Hey @jckarter, you just finished a tour of duty as the dynamic Self czar -- does this fix look OK for 3.1?

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@tkremenek tkremenek merged commit 493db43 into swiftlang:swift-3.1-branch Mar 5, 2017
@tkremenek
Copy link
Member

Merging to push through more CI testing and to generate a downloadable snapshot, but would appreciate @jckarter's sign off.

@jckarter
Copy link
Contributor

jckarter commented Mar 6, 2017

Looks good.

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