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-10292] Missing fix-it to add 'override' keyword while trying to override a computed property #52692
Comments
Can I take a shot at this? I've been wanting to contribute to Swift! |
I believe slazarus (JIRA User) wanted to take this, but if he doesn't mind, I'm okay with that as well. |
I actually have a PR for this (noticed a FIXME for rdar://16320042 a while ago in `checkSingleOverride()`), just haven't created it yet. I can do that now if it's ok? |
Comment by Sam Lazarus (JIRA) @micahbenn It looks like @theblixguy already had some work done on this, but feel free to look at the tickets labeled starter bug. There are lots of other things you can work on to get started contributing 🙂 |
I don’t mind letting @micahbenn taking over this... I can help if you get stuck! |
Appreciate it guys. And thanks @theblixguy! I'll give it a go. |
No problem. Just a hint - the fix needs to go inside a method called `checkSingleOverride()` in TypeCheckDeclOverride.cpp. Take a look at https://github.com/apple/swift/blob/d24bc387973bcf60f5596ff387b996c1eb356456/lib/Sema/TypeCheckDeclOverride.cpp#L1633. As you can see, there's already a FIXME about this exact bug. So this is where the new code is going to go. |
@theblixguy Just an update: I've been trying to get Swift to build with Ninja so I can test my changes, but ran into some snags. I'm looking into it. https://forums.swift.org/t/unable-to-build-swift-on-mac-using-ninja/24131 |
Comment by Phill Farrugia (JIRA) I've implemented a fix for this as my first starter task, if it's alright for me to submit a PR for it @micahbenn? |
Yeah, I'm fine with that. Don't know if @theblixguy had any plans if I couldn't do it. I'm still having trouble with Ninja. phillfarrugia (JIRA User) |
Feel free to put the PR up. I’ll take a look! |
Comment by Phill Farrugia (JIRA) Fix has been merged into master https://github.com/apple/swift/pull/25315/files |
Additional Detail from JIRA
md5: a03a0256ed9c83cbf6af3e89d6e9a471
Issue Description:
Consider following example:
It produces following errors:
But as you can see there is only one 'override' fix-it suggested - for `func b`.
The text was updated successfully, but these errors were encountered: