-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Regex] Infer 'Match' type of regex literals. #40717
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
Conversation
Note: This should not be merged until we have next tag (dev/5) in the string processing repo. |
Build failed |
@swift-ci please test |
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 basically LGTM, but you might want another pair of eyes from the compiler team on it.
Applies swift-experimental-string-processing#68 in regex literal type inference. Regex literals with captures will have type `Regex<Tuple{n}<Substring, {Captures...}>>`. This is a temporary thing that allows us to define generic constraints on captures. We will switch back to native tuples once we have variadic generics.
@swift-ci please smoke test and merge |
Build failed |
Applies swiftlang/swift-experimental-string-processing#68 in regex literal type inference. Regex literals with captures will have type
Regex<Tuple{n}<Substring, {Captures...}>>
. This is a temporary thing that allows us to define generic constraints on captures. We will switch back to native tuples once we have variadic generics.