Skip to content

Commit 1a65e1e

Browse files
committed
Merge branch 'swift/release/5.7' into main_as_of_12_may
2 parents b8178c2 + 53a27f4 commit 1a65e1e

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Sources/_StringProcessing/ByteCodeGen.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ extension Compiler.ByteCodeGen {
188188
mutating func emitCharacter(_ c: Character) throws {
189189
// Unicode scalar matches the specific scalars that comprise a character
190190
if options.semanticLevel == .unicodeScalar {
191-
print("emitting '\(c)' as a sequence of \(c.unicodeScalars.count) scalars")
192191
for scalar in c.unicodeScalars {
193192
try emitScalar(scalar)
194193
}

Tests/RegexBuilderTests/AlgorithmsTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import XCTest
1313
import _StringProcessing
1414
import RegexBuilder
1515

16+
@available(SwiftStdlib 5.7, *)
1617
class RegexConsumerTests: XCTestCase {
1718
func testMatches() {
1819
let regex = Capture(OneOrMore(.digit)) { 2 * Int($0)! }

Tests/RegexTests/CaptureTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ extension CaptureList.Capture {
3939
}
4040

4141
static func named(_ name: String, opt: Int = 0) -> Self {
42-
return Self(name: name, optionalDepth: opt, .fake)
43-
}
42+
return Self(name: name, optionalDepth: opt, .fake) }
4443
}
4544
extension CaptureList {
4645
static func caps(count: Int) -> Self {

Tests/RegexTests/ParseTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,10 @@ extension RegexTests {
26692669
diagnosticTest(#"[\d--\u{a b}]"#, .unsupported("scalar sequence in custom character class"))
26702670
diagnosticTest(#"[\d--[\u{a b}]]"#, .unsupported("scalar sequence in custom character class"))
26712671

2672+
// MARK: Unicode scalars
2673+
2674+
diagnosticTest(#"\u{G}"#, .expectedNumber("G", kind: .hex))
2675+
26722676
// MARK: Matching options
26732677

26742678
diagnosticTest(#"(?^-"#, .cannotRemoveMatchingOptionsAfterCaret)

0 commit comments

Comments
 (0)