mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
433 B
Swift
20 lines
433 B
Swift
// RUN: %target-swift-frontend -emit-sil %s
|
|
|
|
// https://github.com/apple/swift/issues/50711
|
|
|
|
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>> { }
|
|
|