mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This fixes a regression from a00157ec43.
My change made it so that sourceKey.Kind was checked after being
overwritten with an abstract conformance, so we would never take
the if statement. Incredibly, it almost worked.
Fixes rdar://problem/148698142.
30 lines
418 B
Swift
30 lines
418 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
public protocol P1 {
|
|
associatedtype A: P3
|
|
}
|
|
|
|
public protocol P2: P1 where A.B == G<C> {
|
|
associatedtype C where C == A.B.C
|
|
}
|
|
|
|
public protocol P3 {
|
|
associatedtype B: P4
|
|
}
|
|
|
|
public protocol P4: P5 {}
|
|
|
|
public protocol P5 {
|
|
associatedtype C: P6
|
|
}
|
|
|
|
public protocol P6 {
|
|
func foo()
|
|
}
|
|
|
|
public struct G<C: P6>: P4 {}
|
|
|
|
public func f<T: P2>(_: T, c: T.C) {
|
|
return c.foo()
|
|
}
|