File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1979,10 +1979,10 @@ extension RegexDSLTests {
19791979 OneOrMore ( . digit)
19801980 } transform: { Int ( $0) ! }
19811981 " / "
1982- // denominator
1982+ // denominator (modified to test for double optional)
19831983 Capture {
19841984 OneOrMore ( . digit)
1985- } transform: { Int ( $0) ! }
1985+ } transform: { Optional . some ( Int ( $0) ) }
19861986 }
19871987
19881988 do {
@@ -1995,7 +1995,7 @@ extension RegexDSLTests {
19951995 XCTAssert ( erasedMatch. output [ 0 ] . type == Substring . self)
19961996 XCTAssert ( erasedMatch. output [ 1 ] . type == Int ? . self)
19971997 XCTAssert ( erasedMatch. output [ 2 ] . type == Int . self)
1998- XCTAssert ( erasedMatch. output [ 3 ] . type == Int . self)
1998+ XCTAssert ( erasedMatch. output [ 3 ] . type == Int?? . self )
19991999 }
20002000
20012001 do {
@@ -2007,7 +2007,7 @@ extension RegexDSLTests {
20072007 let erasedMatch = Regex< AnyRegexOutput> . Match( match)
20082008 XCTAssert ( erasedMatch. output [ 0 ] . type == Substring . self)
20092009 XCTAssert ( erasedMatch. output [ 2 ] . type == Int . self)
2010- XCTAssert ( erasedMatch. output [ 3 ] . type == Int . self)
2010+ XCTAssert ( erasedMatch. output [ 3 ] . type == Int?? . self )
20112011
20122012 XCTExpectFailure {
20132013 // `nil` value is interpreted as `Substring?` instead of `Int?`
You can’t perform that action at this time.
0 commit comments