Merge pull request #85088 from slavapestov/test-issue-85084

Add regression test for fixed crasher
This commit is contained in:
Slava Pestov
2025-10-23 18:39:24 -04:00
committed by GitHub

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