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?
to your account
Xcode 10.0 beta 5 (10L221o)
Given a objc base class that has a readonly property and also conforms to ProtocolA:
@interface ClassA : NSObject <ProtocolA>
@property (readonly, nonatomic, nullable) NSString *aProperty;
Where ProtocolA defines a getter for a property:
- (nullable NSString *)aProperty;
A subclass that redefines the property as readwrite:
@interface ClassB : ClassA
@property (readwrite, nonatomic, nullable) NSString *aProperty;
The property is incorrectly bridged to readonly in Swift:
let classB = ClassB()
classB.aProperty = "foo" // Error: Cannot assign to property: 'aProperty' is a get-only property
This is a regression from Swift 4 / Xcode 9.4.1 (9F2000) where the property is bridged as readwrite.
Attached sample project that includes the code above.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
The protocol is relevant, too. I guess we're refusing to import the "conflicting" property before realizing that there's one in the superclass anyway.
@belkadan: I still see this issue in Xcode 10 GM - Version 10.0 (10A254a). Perhaps the commit was simply to late to be included in the release branch? But I am not sure which release branch to check.
That's correct, the fix did not make it into the release branch. Sorry for the trouble.
@bobergj, Could you verify if the problem is fixed and if so move the JIRA to "Closed"?
No branches or pull requests