Skip to content

Commit ab0b400

Browse files
committed
[NFC] Avoid use of unavailable range 'contains' method
This method appears to be missing in the host standard library on some CI platforms, still.
1 parent 61afe79 commit ab0b400

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Sources/SwiftWarningControl/WarningControlRegions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private class WarningControlRegionNode {
254254

255255
/// Add a child region that is directly nested within this region
256256
func addChild(_ node: WarningControlRegionNode) {
257-
precondition(range.contains(node.range))
257+
precondition(range.lowerBound <= node.range.lowerBound && range.upperBound >= node.range.upperBound)
258258
children.append(node)
259259
children.sort()
260260
}

Tests/SwiftWarningControlTest/WarningControlTests.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ private func assertWarningGroupControl(
386386
groupInheritanceTree: groupInheritanceTree
387387
)
388388

389-
print(warningControlRegions.debugDescription)
390-
391389
let groupControl = token.warningGroupControl(
392390
for: diagnosticGroupID,
393391
globalControls: globalControls,

0 commit comments

Comments
 (0)