Files
swift-mirror/validation-test/compiler_crashers_2_fixed/rdar71162777.swift
Slava Pestov 8edf4264ae GSB: Better handling of unresolved DependentMemberTypes in maybeResolveEquivalenceClass()
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>.
2021-02-11 16:33:35 -05:00

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