Skip to content

Commit 6bcc526

Browse files
committed
RequirementMachine: Add -debug-generic-signatures output to test/Generics/sr12531.swift
1 parent 991fe1d commit 6bcc526

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/Generics/sr12531.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-typecheck-verify-swift -requirement-machine-protocol-signatures=verify -requirement-machine-inferred-signatures=verify
22

33
protocol AnyPropertyProtocol {
44
associatedtype Root = Any
@@ -8,15 +8,21 @@ protocol AnyPropertyProtocol {
88
var value: Value { get }
99
}
1010

11+
// CHECK-LABEL: .PartialPropertyProtocol@
12+
// CHECK-NEXT: Requirement signature: <Self where Self : AnyPropertyProtocol, Self.[AnyPropertyProtocol]KP : PartialKeyPath<Self.[AnyPropertyProtocol]Root>
1113
protocol PartialPropertyProtocol: AnyPropertyProtocol
1214
where KP: PartialKeyPath<Root> {
1315
}
1416

17+
// CHECK-LABEL: .PropertyProtocol@
18+
// CHECK-NEXT: Requirement signature: <Self where Self : PartialPropertyProtocol, Self.[AnyPropertyProtocol]KP : WritableKeyPath<Self.[AnyPropertyProtocol]Root, Self.[AnyPropertyProtocol]Value>
1519
protocol PropertyProtocol: PartialPropertyProtocol
1620
where KP: WritableKeyPath<Root, Value> {
1721
}
1822

1923
extension Dictionary where Value: AnyPropertyProtocol {
24+
// CHECK-LABEL: .subscript@
25+
// CHECK-NEXT: Generic signature: <R, V, P where P : PropertyProtocol, P.[AnyPropertyProtocol]Root == R, P.[AnyPropertyProtocol]Value == V>
2026
subscript<R, V, P>(key: Key, path: WritableKeyPath<R, V>) -> P? where P: PropertyProtocol, P.Root == R, P.Value == V {
2127
return self[key] as? P
2228
}

0 commit comments

Comments
 (0)