Add regression test for fixed crasher

This commit is contained in:
Slava Pestov
2025-10-23 12:57:32 -04:00
parent 4998cd6d17
commit 0ff6614c70

View File

@@ -0,0 +1,19 @@
// RUN: %target-typecheck-verify-swift
protocol P1 {}
protocol P2 {
associatedtype U
}
protocol P3<T> {
associatedtype T: P2
}
struct S1<T: P2>: P3 where T.U: P1 {}
extension P3 where Self == S1<T> { // expected-error {{same-type constraint 'Self' == 'S1<Self.T>' is recursive}}
static var a: S1<T> {
S1<T>()
}
}