-
Notifications
You must be signed in to change notification settings - Fork 50
Use some RegexComponent
in variadic inits
#636
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
Use some RegexComponent
in variadic inits
#636
Conversation
Please test with following pull request: @swift-ci please test |
@@ -15,9 +15,9 @@ | |||
@available(SwiftStdlib 5.7, *) | |||
extension Regex { | |||
/// Creates a regular expression using a RegexBuilder closure. | |||
public init<Content: RegexComponent>( |
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.
Would this break ABI? Isn't some RegexComponent<Output>
in the closure return type going to be an opaque return type, not a generic parameter on the parent declaration?
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.
This particular change is just a syntactic transformation of the original. You can get into trouble with multiple generic parameters, since the order is important to the ABI, but luckily all of those are @_alwaysEmitIntoClient
. (This one should probably be that as well, tbh.)
Please test with following pull request: @swift-ci please test |
1 similar comment
Please test with following pull request: @swift-ci please test |
@swift-ci please test |
I guess we have to wait some more... |
Yeah, I don't think the compiler change has landed in the nightly yet, so probably not until later Friday. |
@swift-ci Please test |
Alright, the compiler changes are in the |
@swift-ci Please test |
This supports a type checker fix after the change in how result builder closure parameters are type-checked.
bc6021a
to
8e42667
Compare
@swift-ci Please test |
This updates VariadicsGenerator to print declaration with
some RegexComponent<...>
instead of the full generic signature, which will hopefully give the type checker more detailed information to work with aboutRegexComponentBuilder
closures.