Skip to content

Commit 6c4d040

Browse files
authored
Merge pull request #81928 from slavapestov/test-issue-81712
Add regression test for fixed crasher
2 parents 4fb4945 + 02ee1a3 commit 6c4d040

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
protocol Id {
4+
associatedtype ID
5+
}
6+
7+
protocol P<Id1> {
8+
associatedtype Id1: Id
9+
associatedtype Id2: Id where Id2.ID == Id1.ID
10+
11+
func foo(_: Id2.ID)
12+
}
13+
14+
struct MyId: Id {
15+
typealias ID = Int
16+
}
17+
18+
func f(id: Int, cache: any P<MyId>) {
19+
cache.foo(id)
20+
}

0 commit comments

Comments
 (0)