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
[Import as Member] Error on convenience inits in extensions of CFTypes #4419
Conversation
@@ -2040,6 +2040,9 @@ ERROR(enumstruct_convenience_init,none, | |||
ERROR(nonclass_convenience_init,none, | |||
"convenience initializer not allowed in non-class type %0", | |||
(Type)) | |||
ERROR(cfclass_convenience_init,none, | |||
"convenience initializer not yet supported for extensions of CF Types", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"types"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a plural / singular mismatch? "convenience initializers are not yet supported in extensions of CF types".
Some diagnostic wording comments, but the logic looks good. |
@swift-ci please test |
@@ -2040,6 +2040,9 @@ ERROR(enumstruct_convenience_init,none, | |||
ERROR(nonclass_convenience_init,none, | |||
"convenience initializer not allowed in non-class type %0", | |||
(Type)) | |||
ERROR(cfclass_convenience_init,none, | |||
"convenience initializers are not yet supported in extensions of CF types", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though we plan on fixing this some day, I think s/yet // is more professional sounding here
@swift-ci please test |
Build failed |
Swift does not currently support user-defined factory inits. With import as member, we're seeing many C functions now imported as initializers, which gives users the false hope that they can define their own factory inits as conveinence inits in extensions of CF types. We issue an explicit error now, rather than crashing later.
@swift-ci please test |
@shahmishal this passed testing, any idea why I can't merge it? |
@milseman smoke test check must pass, I added new feature last night if you trigger "Please test" it will also update smoke test checks. |
@swift-ci please smoke test |
This has been merged into Swift-3 branch because it passed those tests. It's just waiting on the technicality of smoke tests, but Linux is already broken for other reasons. What is the best way to proceed if this one fails yet again? |
@swift-ci please smoke test |
@shahmishal please advise |
What's in this pull request?
Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.
Swift does not currently support user-defined factory inits. With
import as member, we're seeing many C functions now imported as
initializers, which gives users the false hope that they can define
their own factory inits as conveinence inits in extensions of CF
types. We issue an explicit error now, rather than crashing later.