Skip to content

Commit b87fd12

Browse files
committed
[Index] Update test related to reporting extensions in system modules
1 parent 40ef504 commit b87fd12

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

test/SourceKit/Indexing/Inputs/test_module.index.response

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,16 @@
172172
{
173173
key.kind: source.lang.swift.decl.extension.class,
174174
key.name: "C2",
175-
key.usr: "s:e:s:11test_module2C2C6SECRETyyF"
175+
key.usr: "s:e:s:11test_module2C2C10publicFuncyyF",
176+
key.entities: [
177+
{
178+
key.kind: source.lang.swift.decl.function.method.instance,
179+
key.name: "publicFunc()",
180+
key.usr: "s:11test_module2C2C10publicFuncyyF",
181+
key.is_dynamic: 1,
182+
key.effective_access: source.decl.effective_access.public
183+
}
184+
]
176185
}
177186
]
178187
}

test/SourceKit/Indexing/Inputs/test_module.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class TwoInts {
1212
public class ComputedProperty {
1313
public var value : Int {
1414
get {
15-
var result = 0
15+
let result = 0
1616
return result
1717
}
1818
set(newVal) {
@@ -33,6 +33,16 @@ public func globalFunc() {}
3333

3434
private func SECRET() {}
3535

36+
extension C2 {
37+
public func publicFunc() {}
38+
}
39+
40+
// Don't record extensions with nothing to index.
3641
extension C2 {
3742
internal func SECRET() {}
43+
private func SECRET1() {}
44+
fileprivate func SECRET2() {}
3845
}
46+
47+
internal protocol InternalProto {}
48+
extension C2: InternalProto {}

0 commit comments

Comments
 (0)