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

SIL: Fix SIL verifier's VerifyClassMethodVisitor [5.1] #26000

Conversation

slavapestov
Copy link
Member

@slavapestov slavapestov commented Jul 8, 2019

When checking a super method call, make sure we look at the vtable
for the right class.

Previously we would visit all the methods of the derived class,
together with any methods they override, but that is not quite
right -- it's perfectly legal to use 'super' to call a method that
you're not overriding too.

Fixes https://bugs.swift.org/browse/SR-10260, rdar://problem/49522825.

When checking a super method call, make sure we look at the vtable
for the right class.

Previously we would visit all the methods of the derived class,
together with any methods they override, but that is not quite
right -- it's perfectly legal to use 'super' to call a method that
you're not overriding too.

Fixes <https://bugs.swift.org/browse/SR-10260>.
@slavapestov slavapestov requested a review from jckarter July 8, 2019 18:47
@slavapestov
Copy link
Member Author

@swift-ci Please test

Copy link
Member

@jckarter jckarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

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

2 participants