mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We need to pass down the generic signature of the caller to correctly mangle the substitution map, because the replacement types in this substitution maps are interface types for the caller's generic signature. Fixes rdar://problem/161968922.
18 lines
559 B
Swift
18 lines
559 B
Swift
// RUN: %target-swift-frontend -emit-sil -O %s
|
|
|
|
extension Array: Comparable where Element: Comparable {
|
|
public static func < (lhs: Array<Element>, rhs: Array<Element>) -> Bool {
|
|
// Contents do not matter
|
|
for (l, r) in zip(lhs, rhs) { if l != r { return l < r } }
|
|
return lhs.count < rhs.count
|
|
}
|
|
}
|
|
|
|
public struct Wrapper<Symbol: Hashable & Comparable>: Hashable {
|
|
public var partitions: PartitionSet<Array<Symbol>>
|
|
}
|
|
|
|
public struct PartitionSet<Symbol: Hashable & Comparable>: Equatable, Hashable {
|
|
public var partitions: Set<Set<Symbol>>
|
|
}
|