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
[ClangImporter] Non-class member initializers are not "factory" inits. #8540
Conversation
That is, the stubs we generate when you rename a C global function imported as a type member using the SwiftName API note. (See the test case changes.) Previously we hit an assertion. For good measure, also fix versioned stubs for types-as-members, which were always added to their original context rather than the new context. rdar://problem/31435658
Structs and enums don't distinguish between different initializer kinds in the declaration, because there is no inheritance. This occurs with import-as-member.
@swift-ci Please test |
Build failed |
Whoops, did I drop the ball on this PR? @jrose-apple do you still want to do this? The code looks ok to me, but I'm afraid my brain has purged all memory of any details pertaining to import-as-factory-init. |
Build failed |
I didn't actually manage to get it to pass tests, so I'm keeping it around for later. Thanks for following up, though. |
ping? |
Have never gotten back to this one, sorry. (My gripe today was about PRs all opened in the last month.) |
@jrose-apple Do you still want to hold this open? |
It's still more correct in theory, but it definitely broke things at the time, and I don't know when I'd be back to it. I'll close-but-not-delete like the others. |
Structs and enums don't distinguish between different initializer kinds in the declaration, because there is no inheritance. This occurs with import-as-member.
This slurps in #8539, where I discovered the issue, because it was easy to add a test that way.