// RUN: %target-swift-frontend -typecheck %s struct Model where E: Comparable { enum TimePeriod: CaseIterable { case day, week, month, year } } struct MyStruct where E: Comparable { init(entries: EA) where EA: BidirectionalCollection, EA.Element == E, EA.Index == Int { typealias MDict = [Model.TimePeriod : T] where T: Numeric func maxDict(_ keyPath: KeyPath, MDict>) -> MDict { fatalError() } fatalError() } }