Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0083-rdar31163470-2.swift
Doug Gregor 8dfc25edc7 [GSB] Filter out conformance constraints derived from concrete conformance.
When an otherwise abstract conformance constraint is derived from a
concrete conformance, retain the abstract conformance by removing the
requirement source that involves the concrete conformance. This
eliminates our reliance on the concrete conformance, which is not
retained as part of the generic signature.

Fixes rdar://problem/31163470 and rdar://problem/31520386.
2017-04-16 23:05:23 -07:00

24 lines
327 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir
protocol C {
associatedtype I
}
protocol PST {
associatedtype LT : C
}
protocol SL {
associatedtype S : PST
}
struct PEN<_S : PST> : SL {
typealias S = _S
let l: _S.LT.I
}
struct PE<N : SL> {
let n: N
static func c<S>(_: PE<N>) where N == PEN<S> {}
}