Skip to content

Commit 8d6b242

Browse files
committed
Add regression test for fixed crasher
1 parent e1e9f04 commit 8d6b242

File tree

1 file changed

+18
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)