mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
26 lines
578 B
Swift
26 lines
578 B
Swift
// RUN: %target-swift-frontend -emit-ir -g -primary-file %s
|
|
|
|
// https://github.com/apple/swift/issues/56409
|
|
|
|
public struct PowerCollection<C : Collection> : Collection {
|
|
public typealias Index = [C.Index]
|
|
public typealias Element = [C.Element]
|
|
|
|
public var startIndex, endIndex: Index
|
|
|
|
public subscript(position: Index) -> [C.Element] {
|
|
return []
|
|
}
|
|
|
|
public func index(after i: Index) -> Index {
|
|
return i
|
|
}
|
|
|
|
}
|
|
|
|
extension Array : Comparable where Element : Comparable {
|
|
public static func < (lhs: [Element], rhs: [Element]) -> Bool {
|
|
return false
|
|
}
|
|
}
|