Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

jrose-apple
Copy link
Contributor

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.

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.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 4, 2017

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 4f6e88b
Test requested by - @jrose-apple

@milseman
Copy link
Contributor

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.

@swift-ci
Copy link
Collaborator

Build failed
Swift Test OS X Platform
Git Sha - 4f6e88b

@jrose-apple
Copy link
Contributor Author

I didn't actually manage to get it to pass tests, so I'm keeping it around for later. Thanks for following up, though.

@milseman
Copy link
Contributor

ping?

@jrose-apple
Copy link
Contributor Author

Have never gotten back to this one, sorry. (My gripe today was about PRs all opened in the last month.)

@CodaFi
Copy link
Member

CodaFi commented Nov 15, 2019

@jrose-apple Do you still want to hold this open?

@jrose-apple
Copy link
Contributor Author

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.

@jrose-apple jrose-apple closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants