mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
14 lines
321 B
Swift
14 lines
321 B
Swift
// RUN: %target-swift-frontend %s -emit-ir
|
|
|
|
// https://github.com/apple/swift/issues/46967
|
|
|
|
class IndexPath {
|
|
init(indexes: [Int]) {}
|
|
}
|
|
|
|
extension CountableRange where Bound == Int {
|
|
func indexPaths(inSection section: Bound) -> [IndexPath] {
|
|
return reduce([]) { $0 + [IndexPath(indexes: [section, $1])] }
|
|
}
|
|
}
|