mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If a typealias is inside a protocol, and things are defined in a certain order, the NameAliasType for that typealias can be constructed before the parent protocol has been validated (i.e. before its generic environment exists), in which case it is missing the necessary substitutions. Fixes rdar://problem/39636312.
12 lines
167 B
Swift
12 lines
167 B
Swift
// RUN: %target-swift-frontend %s -emit-module
|
|
|
|
protocol P2 {
|
|
func f1<T : P1>(_: T) -> T.T1
|
|
}
|
|
|
|
public struct S1<U> {}
|
|
|
|
protocol P1 {
|
|
typealias T1 = S1<Self>
|
|
}
|