Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bplattenburg/5aff77a665ef770998c63b7e48c1e603 to your computer and use it in GitHub Desktop.
Save bplattenburg/5aff77a665ef770998c63b7e48c1e603 to your computer and use it in GitHub Desktop.
Swift masking property with computed var from extension should fail
// This fails in an isolated playground as expected,
// but when the original struct is in an SPM package
// and the extension is in my app it does not,
// and the extension version is what ultimately gets called
public struct Test {
public var property: String
}
extension Test {
var property: String { "extension" }
}
@bplattenburg
Copy link
Author

Screenshot 2024-06-04 at 10 39 39 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment