mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Regex] Switch regex match to Swift tuples.
Typed captures no longer use ad-hoc nominal tuples. We use Swift native tuples instead. See apple/swift-experimental-string-processing#127. Update checkout tag to dev/6.
This commit is contained in:
@@ -47,7 +47,7 @@ RegexBasicTests.test("Captures") {
|
||||
"""
|
||||
let regex = '/([0-9A-F]+)(?:\.\.([0-9A-F]+))?\s+;\s+(\w+).*/'
|
||||
// Test inferred type.
|
||||
let _: Regex<Tuple4<Substring, Substring, Substring?, Substring>>.Type
|
||||
let _: Regex<(Substring, Substring, Substring?, Substring)>.Type
|
||||
= type(of: regex)
|
||||
let match1 = input.expectMatch(regex)
|
||||
expectEqual(input[...], input[match1.range])
|
||||
|
||||
Reference in New Issue
Block a user