mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A DependentMemberType can either have a bound AssociatedTypeDecl, or it might be 'unresolved' and only store an identifier. In maybeResolveEquivalenceClass(), we did not handle the unresolved case when the base type of the DependentMemberType had itself been resolved to a concrete type. Fixes <rdar://problem/71162777>.
20 lines
422 B
Swift
20 lines
422 B
Swift
// RUN: %target-swift-frontend -emit-ir %s
|
|
|
|
public struct LowerModel {
|
|
public typealias Index = Int
|
|
}
|
|
|
|
public protocol LowerChildA {
|
|
typealias Model = LowerModel
|
|
typealias ModelIndex = Model.Index
|
|
}
|
|
|
|
public protocol LowerChildB {
|
|
typealias Model = LowerModel
|
|
typealias ModelIndex = Model.Index
|
|
}
|
|
|
|
public protocol Parent: LowerChildA & LowerChildB {}
|
|
|
|
public func foo<T : Parent>(_: T, _: T.Model, _: T.ModelIndex) {}
|