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

[SR-1693] Allow subclassing classes that have internal methods #44302

Closed
slavapestov opened this issue Jun 6, 2016 · 2 comments
Closed

[SR-1693] Allow subclassing classes that have internal methods #44302

slavapestov opened this issue Jun 6, 2016 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@slavapestov
Copy link
Member

Previous ID SR-1693
Radar None
Original Reporter @slavapestov
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 8cf312f130cb658c11720978fde073b0

blocks:

  • SR-258 Resilient class layout

Issue Description:

Right now, this type of thing won't link:

public class A {
internal func foo() {}
}

// In some other module:
class B : A {}

This is because the vtable for B references A.foo, which is internal. The correct solution is to fix up the vtable in the same manner that we will do for library evolution purposes. Since we can't "know" the address of A.foo, we have to let the runtime build B's vtable.

@belkadan
Copy link
Contributor

belkadan commented Jun 6, 2016

Another answer for right now would be to make the symbol for foo public.

@slavapestov
Copy link
Member Author

This actually already works, just not in the way we want; resilient vtables are tracked by https://bugs.swift.org/browse/SR-1693.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

2 participants