Skip to content

Commit b256e8d

Browse files
authored
Merge pull request swiftlang#31050 from bitjammer/acgarland/rdar-61843516-add-additional-test
[SymbolGraph] Add additional filtering test NFC
2 parents 1a41219 + c27238b commit b256e8d

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-build-swift %s -module-name FilterImplicitlyPrivate -emit-module -emit-module-path %t/
3+
// RUN: %target-swift-symbolgraph-extract -module-name FilterImplicitlyPrivate -I %t -pretty-print -output-dir %t
4+
// RUN: %FileCheck %s --input-file %t/FilterImplicitlyPrivate.symbols.json
5+
6+
// Make sure extensions on implicitly private (< public or underscored, or inside one of those)
7+
// don't emit relationships (or symbols)
8+
9+
struct Internal {}
10+
11+
extension Internal: CustomDebugStringConvertible {
12+
var debugDescription: String {
13+
return ""
14+
}
15+
}
16+
17+
public struct _PublicUnderscored {}
18+
19+
extension _PublicUnderscored: CustomDebugStringConvertible {
20+
public var debugDescription: String {
21+
return ""
22+
}
23+
}
24+
25+
extension _PublicUnderscored {
26+
public struct PublicInner {}
27+
public struct _PublicUnderscoredInner {}
28+
struct InternalInner {}
29+
}
30+
31+
extension _PublicUnderscored.PublicInner: CustomDebugStringConvertible {
32+
public var debugDescription: String {
33+
return ""
34+
}
35+
}
36+
37+
extension _PublicUnderscored._PublicUnderscoredInner: CustomDebugStringConvertible {
38+
public var debugDescription: String {
39+
return ""
40+
}
41+
}
42+
43+
extension _PublicUnderscored.InternalInner: CustomDebugStringConvertible {
44+
public var debugDescription: String {
45+
return ""
46+
}
47+
}
48+
49+
// CHECK: "symbols": []
50+
// CHECK: "relationships": []

0 commit comments

Comments
 (0)