File tree 2 files changed +6
-7
lines changed
Sources/_StringProcessing/RegexDSL
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ let package = Package(
44
44
dependencies: [ " _MatchingEngine " , " _CUnicode " ] ,
45
45
swiftSettings: [
46
46
. unsafeFlags( [ " -enable-library-evolution " ] ) ,
47
- . unsafeFlags( [ " -Xfrontend " , " -enable-experimental-pairwise-build-block " ] )
47
+ . unsafeFlags( [ " -Xfrontend " , " -enable-experimental-pairwise-build-block " ] ) ,
48
+ . unsafeFlags( [ " -Xfrontend " , " -enable-parameterized-protocol-types " ] )
48
49
] ) ,
49
50
. testTarget(
50
51
name: " RegexTests " ,
Original file line number Diff line number Diff line change 11
11
12
12
import _MatchingEngine
13
13
14
-
15
14
/// A type that represents a regular expression.
16
- public protocol RegexComponent {
17
- associatedtype Match
15
+ public protocol RegexComponent < Match> {
18
16
var regex : Regex < Match > { get }
19
17
}
20
18
@@ -84,9 +82,9 @@ public struct Regex<Match>: RegexComponent {
84
82
self = content. regex
85
83
}
86
84
87
- public init < Content : RegexComponent > (
88
- @RegexComponentBuilder _ content: ( ) -> Content
89
- ) where Content . Match == Match {
85
+ public init (
86
+ @RegexComponentBuilder _ content: ( ) -> some RegexComponent < Match >
87
+ ) {
90
88
self . init ( content ( ) )
91
89
}
92
90
You can’t perform that action at this time.
0 commit comments