Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0156-rdar39636312.swift
Huon Wilson be5a3abcd6 [Sema] Ensure that NameAliasTypes record the right substitutions.
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.
2018-04-26 23:55:54 +10:00

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