7
7
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS
8
8
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS-DOCS
9
9
// 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
10
11
11
12
// RUN: %target-swift-symbolgraph-extract -module-name InheritedDocs -I %t -pretty-print -output-dir %t -skip-inherited-docs
12
13
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes CHECK,SKIP
13
14
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes IMPL
14
15
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS
15
16
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes BONUS-SKIP
16
17
// RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes EXTRA
18
+ // RUN: %FileCheck %s --input-file %t/InheritedDocs.symbols.json --check-prefixes LOCAL
17
19
18
20
// RUN: %empty-directory(%t)
19
21
// 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
56
58
// EXTRA-NEXT: "identifier": "s:13InheritedDocs1PPAAE9extraFuncyyF"
57
59
// EXTRA-NEXT: "displayName": "P.extraFunc()"
58
60
61
+ // local implementations of a local protocol still need to a relation to that protocol
62
+
63
+ // LOCAL: "source": "s:13InheritedDocs1SV9localFuncyyF"
64
+ // LOCAL-NEXT: "target": "s:13InheritedDocs1SV"
65
+ // LOCAL-NEXT: "sourceOrigin"
66
+ // LOCAL-NEXT: "identifier": "s:13InheritedDocs1PP9localFuncyyF"
67
+ // LOCAL-NEXT: "displayName": "P.localFunc()"
68
+
59
69
/// Protocol P
60
70
public protocol P {
61
71
/// Some Function
62
72
func someFunc( )
73
+
74
+ /// It's a local function!
75
+ func localFunc( )
63
76
}
64
77
65
78
public extension P {
@@ -72,4 +85,5 @@ public extension P {
72
85
}
73
86
74
87
public struct S : P {
88
+ public func localFunc( ) { }
75
89
}
0 commit comments