Skip to content

Commit 6ebf0d5

Browse files
committed
Add a test showing local content being ignored
1 parent 51c0024 commit 6ebf0d5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/SourceKit/Indexing/index_effective_access_level.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,7 @@ protocol ProtocolWithAssociatedType {
212212

213213
struct ProtocolWithAssociatedTypeImpl: ProtocolWithAssociatedType {
214214
typealias T = Int
215+
func testLocalContent() {
216+
let localVariableShouldntBeIndexed = 0
217+
}
215218
}

test/SourceKit/Indexing/index_effective_access_level.swift.response

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3759,6 +3759,14 @@
37593759
],
37603760
key.effective_access: source.decl.effective_access.internal
37613761
},
3762+
{
3763+
key.kind: source.lang.swift.decl.function.method.instance,
3764+
key.name: "testLocalContent()",
3765+
key.usr: "s:28index_effective_access_level30ProtocolWithAssociatedTypeImplV16testLocalContentyyF",
3766+
key.line: 215,
3767+
key.column: 10,
3768+
key.effective_access: source.decl.effective_access.internal
3769+
},
37623770
{
37633771
key.kind: source.lang.swift.decl.function.constructor,
37643772
key.usr: "s:28index_effective_access_level30ProtocolWithAssociatedTypeImplVACycfc",

0 commit comments

Comments
 (0)