mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When looking for a representative superclass constraint, take into account other same-type constraints by comparing against the resolved superclass constraint type rather than the type as spelled. Fixes SR-8179 / rdar://problem/41851224.
18 lines
385 B
Swift
18 lines
385 B
Swift
// RUN: %target-swift-frontend -emit-sil %s
|
|
|
|
protocol SignalInterface {
|
|
associatedtype OutputValue
|
|
}
|
|
|
|
class Signal<OV>: SignalInterface {
|
|
typealias OutputValue = OV
|
|
}
|
|
|
|
extension Signal {
|
|
func foo<U>(_: U) -> SignalChannel<[U], Signal<Array<U>>>
|
|
where OutputValue == Optional<U> { return SignalChannel() }
|
|
}
|
|
|
|
struct SignalChannel<OutputValue, Output: Signal<OutputValue>> { }
|
|
|