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-6944] [Xcode 9.3b2] Objective-C method provided by getter does not match the requirement's selector #49492
Comments
@swift-ci create |
Any chance you can share the full definition of both the protocol and the class? Just want to make sure we fix the same thing you're seeing. |
Comment by Amro Mousa (JIRA) I'm not in a position to do that, but I'll do my best to reproduce the issue in a sample project today and attach it to this ticket. |
My initial diagnosis was wrong; apparently the getter name is preferred (probably because of the common "isFoo" with a property name of "foo", where "isFoo" better matches the Swift conventions). But this code works in both master and 4.0:
So something else funny is going on. |
Also seems to work in Swift 3.1. |
Comment by Amro Mousa (JIRA) Thanks @belkadan. This is working for me in a sample project as well. I'll try to figure out what's different in our larger project. This is code that will be going away in the near future, but I'd still like to understand what's happening. |
Comment by Amro Mousa (JIRA) No luck narrowing this down to a sample project. I'll spend more time on that tomorrow. |
Sorry, I just can't get this to fail locally. Going to have to send it back. :-( |
Good news: an Apple-internal client ran into this too. I don't think the fix'll make 4.1, but at least your workaround should be safe. |
Comment by Amro Mousa (JIRA) That's great news! Thanks @belkadan. |
Reduced:
The error is emitted when compiling b.swift. |
Unfortunately probably not worth pulling into 4.1 at this point, since there is a workaround. |
Took me longer than expected to come to a viable solution, but it's in now! You should be able to test with a master snapshot in the next few days. |
Attachment: Download
Environment
Xcode 9.3 beta 2
Additional Detail from JIRA
md5: 1e35181689a6a6f0a82d0fb4a58a7109
Issue Description:
Filed in response to this Twitter conversation
Attempting to define the short name (selfThreadTweet) results in this error:
and provides a Fix-it to do so.
This seems to be an error in our code, but apparently this should not have been fixed in 9.3b2.
The text was updated successfully, but these errors were encountered: