Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0169-sr8179.swift
Doug Gregor b421d08955 [GSB] Use resolved type when looking for a representative constraint.
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.
2018-07-26 12:42:29 -07:00

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