Skip to content

Commit 8144b3a

Browse files
authored
Work around compiler bug rdar://89449323 (#186)
This was uncovered when testing dev/7 against swiftlang/swift#41430.
1 parent f34686c commit 8144b3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/_StringProcessing/RegexDSL/Match.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public struct RegexMatch<Match> {
1818

1919
public var match: Match {
2020
if Match.self == (Substring, DynamicCaptures).self {
21+
// FIXME(rdar://89449323): Compiler assertion
22+
let input = input
2123
let dynCaps = rawCaptures.map { StoredDynamicCapture($0, in: input) }
2224
return (input[range], dynCaps) as! Match
2325
} else if Match.self == Substring.self {

0 commit comments

Comments
 (0)