Skip to content

Commit be3009d

Browse files
authored
Merge pull request #85088 from slavapestov/test-issue-85084
Add regression test for fixed crasher
2 parents 86e5b64 + 0ff6614 commit be3009d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/Generics/issue-85084.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
protocol P1 {}
4+
5+
protocol P2 {
6+
associatedtype U
7+
}
8+
9+
protocol P3<T> {
10+
associatedtype T: P2
11+
}
12+
13+
struct S1<T: P2>: P3 where T.U: P1 {}
14+
15+
extension P3 where Self == S1<T> { // expected-error {{same-type constraint 'Self' == 'S1<Self.T>' is recursive}}
16+
static var a: S1<T> {
17+
S1<T>()
18+
}
19+
}

0 commit comments

Comments
 (0)