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:
Jordan Rose
2015-08-04 02:10:49 +00:00
parent 828eb68e72
commit 03e3dc2e2d

View File

@@ -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)
}
}