Skip to content

Commit acef026

Browse files
committed
Add regression test for https://bugs.swift.org/browse/SR-13727 / rdar://problem/70298061
1 parent b3578ab commit acef026

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %target-swift-frontend -emit-ir %s
2+
3+
protocol Projection {
4+
associatedtype Root
5+
associatedtype Path: PartialKeyPath<Root>
6+
static var path: Path { get }
7+
}
8+
9+
struct ProjectKey<Key, Value>: Projection {
10+
typealias Root = (Key, Value)
11+
typealias Path = KeyPath<(Key, Value), Key>
12+
static var path: KeyPath<(Key, Value), Key> { \.0 }
13+
}

0 commit comments

Comments
 (0)