77// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS
88// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS-DOCS
99// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes EXTRA
10+ // RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes LOCAL
11+ // RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes SUPER
1012
1113// RUN: %target-swift-symbolgraph-extract -module-name InheritedDocs -I %t -pretty-print -output-dir %t -skip-inherited-docs
1214// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes CHECK,SKIP
1315// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes IMPL
1416// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS
1517// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS-SKIP
1618// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes EXTRA
19+ // RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes LOCAL
20+ // RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes SUPER
1721
1822// RUN: %empty-directory(%t)
1923// RUN: %target-build-swift %s -module-name InheritedDocs -emit-module -emit-module-path %t/InheritedDocs.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/ -skip-inherited-docs
5660// EXTRA-NEXT: "identifier": "s:13InheritedDocs1PPAAE9extraFuncyyF"
5761// EXTRA-NEXT: "displayName": "P.extraFunc()"
5862
63+ // local implementations of a local protocol still need to a relation to that protocol
64+
65+ // LOCAL: "source": "s:13InheritedDocs1SV9localFuncyyF"
66+ // LOCAL-NEXT: "target": "s:13InheritedDocs1SV"
67+ // LOCAL-NEXT: "sourceOrigin"
68+ // LOCAL-NEXT: "identifier": "s:13InheritedDocs1PP9localFuncyyF"
69+ // LOCAL-NEXT: "displayName": "P.localFunc()"
70+
71+ // ...both with and without docs
72+
73+ // SUPER: "source": "s:13InheritedDocs1SV9superFuncyyF"
74+ // SUPER-NEXT: "target": "s:13InheritedDocs1SV"
75+ // SUPER-NEXT: "sourceOrigin"
76+ // SUPER-NEXT: "identifier": "s:13InheritedDocs1PP9superFuncyyF"
77+ // SUPER-NEXT: "displayName": "P.superFunc()"
78+
5979/// Protocol P
6080public protocol P {
6181 /// Some Function
6282 func someFunc( )
83+
84+ /// It's a local function!
85+ func localFunc( )
86+
87+ func superFunc( )
6388}
6489
6590public extension P {
@@ -72,4 +97,7 @@ public extension P {
7297}
7398
7499public struct S : P {
100+ public func localFunc( ) { }
101+
102+ public func superFunc( ) { }
75103}
0 commit comments