Files
swift-mirror/validation-test/compiler_crashers_fixed/0188-issue-51951.swift
Hamish Knight 4e811c3a88 [test] Merge crasher directories
There is no longer much of a good reason to keep these separate,
merge them.
2025-10-18 12:51:30 +01:00

26 lines
466 B
Swift

// RUN: %target-swift-frontend -typecheck %s
// https://github.com/apple/swift/issues/51951
protocol P1 {
associatedtype A1
}
protocol P2 {
associatedtype A2
}
struct S1<G1: P1, G2: P1>: P1 where G1.A1 == G2.A1 {
typealias A1 = G1.A1
}
struct S2<G1: P1, G2: P2>: P2 where G1.A1 == G2.A2 {
typealias A2 = G2.A2
}
struct S3<G1: P1, G2: P2> where G1.A1 == G2.A2 {
func f<G: P1>(_: G) -> S3<S1<G, G1>, S2<G, G2>> {
fatalError()
}
}