mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: Workaround for IntervalType.overlaps to avoid a SIL parser error.
The parse_stdlib tests choke on the constraints that were there previously, so weaken the API to only work on intervals of the same type for now. rdar://problem/22126470 Swift SVN r30977
This commit is contained in:
@@ -158,9 +158,7 @@ extension ClosedInterval {
|
||||
|
||||
extension IntervalType {
|
||||
/// Returns `true` if `lhs` and `rhs` have a non-empty intersection.
|
||||
public func overlaps<
|
||||
I: IntervalType where I.Bound == Bound
|
||||
>(other: I) -> Bool {
|
||||
public func overlaps(other: Self) -> Bool {
|
||||
return contains(other.start) || other.contains(start)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user