Files
swift-mirror/test/SILOptimizer/specialize_output_generic_signature.swift
Slava Pestov 6e53f8c974 SIL: Fix crash in remapParentFunction() due to missing generic signature
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.
2025-10-08 15:56:49 -04:00

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