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

error: cannot inherit from class 'NSLock' because it has overridable members that could not be loaded #870

Closed
clackary opened this issue Aug 16, 2024 · 1 comment

Comments

@clackary
Copy link

The following code snippet builds successfully with the 2024-07-15 nightly toolchain, but fails to build with 2024-07-22. I'm not sure how to check or verify this was caused by the switch to swift-foundation, but the timing seems to line up.

import Foundation

class FooLock: NSLock {}

Actual behavior:

/project/repro.swift:3:7: error: cannot inherit from class 'NSLock' because it has overridable members that could not be loaded
1 | import Foundation
2 | 
3 | class FooLock: NSLock {}
  |       |- error: cannot inherit from class 'NSLock' because it has overridable members that could not be loaded
  |       `- note: could not deserialize 'mutex'
4 | 

Worth noting that it does seem specific to Linux, because the same snippet builds successfully with recent toolchains on macOS.

Expected behavior:
Code builds successfully.

Configuration:
OS: Linux Ubuntu 22.04
Toolchain: swift-DEVELOPMENT-SNAPSHOT-2024-07-22-a-ubuntu22.04-aarch64 or newer

@clackary
Copy link
Author

Realizing that NSLock comes from swift-corelibs-foundation. Filed a new issue over there -- https://github.com/apple/swift-corelibs-foundation/issues/5076

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

No branches or pull requests

1 participant