diff --git a/test/SourceKit/Indexing/Inputs/explicit-access/Exported.swift b/test/SourceKit/Indexing/Inputs/explicit-access/Exported.swift new file mode 100644 index 0000000000000..9f5bcfecd1473 --- /dev/null +++ b/test/SourceKit/Indexing/Inputs/explicit-access/Exported.swift @@ -0,0 +1 @@ +public class ExportedClass {} diff --git a/test/SourceKit/Indexing/Inputs/explicit-access/Module.swift b/test/SourceKit/Indexing/Inputs/explicit-access/Module.swift new file mode 100644 index 0000000000000..40872cea6ee6f --- /dev/null +++ b/test/SourceKit/Indexing/Inputs/explicit-access/Module.swift @@ -0,0 +1,2 @@ +@_exported import Exported +public class ModuleClass {} diff --git a/test/SourceKit/Indexing/Inputs/implicit-vis/a.index.response b/test/SourceKit/Indexing/Inputs/implicit-vis/a.index.response index 7e206b4966cbd..5293536da6ab4 100644 --- a/test/SourceKit/Indexing/Inputs/implicit-vis/a.index.response +++ b/test/SourceKit/Indexing/Inputs/implicit-vis/a.index.response @@ -38,7 +38,8 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.class, @@ -47,7 +48,8 @@ key.line: 2, key.column: 9 } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/Inputs/implicit-vis/b.index.response b/test/SourceKit/Indexing/Inputs/implicit-vis/b.index.response index 5960c9fdc9048..bdee38bf38ada 100644 --- a/test/SourceKit/Indexing/Inputs/implicit-vis/b.index.response +++ b/test/SourceKit/Indexing/Inputs/implicit-vis/b.index.response @@ -38,7 +38,8 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.class, @@ -47,7 +48,8 @@ key.line: 2, key.column: 9 } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/Inputs/test_module.index.response b/test/SourceKit/Indexing/Inputs/test_module.index.response index 0fd7532830caa..85b907997c761 100644 --- a/test/SourceKit/Indexing/Inputs/test_module.index.response +++ b/test/SourceKit/Indexing/Inputs/test_module.index.response @@ -25,7 +25,8 @@ { key.kind: source.lang.swift.decl.class, key.name: "Empty", - key.usr: "s:11test_module5EmptyC" + key.usr: "s:11test_module5EmptyC", + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.class, @@ -49,7 +50,8 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.var.instance, @@ -68,14 +70,17 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.function.constructor, key.name: "init(a:b:)", - key.usr: "s:11test_module7TwoIntsC1a1bACSi_Sitcfc" + key.usr: "s:11test_module7TwoIntsC1a1bACSi_Sitcfc", + key.effective_access: source.decl.effective_access.public } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.class, @@ -99,14 +104,17 @@ key.usr: "s:11test_module16ComputedPropertyC5valueSivs", key.is_dynamic: 1 } - ] + ], + key.effective_access: source.decl.effective_access.public } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.protocol, key.name: "Prot1", - key.usr: "s:11test_module5Prot1P" + key.usr: "s:11test_module5Prot1P", + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.protocol, @@ -118,17 +126,20 @@ key.name: "Prot1", key.usr: "s:11test_module5Prot1P" } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.protocol, key.name: "Prot3", - key.usr: "s:11test_module5Prot3P" + key.usr: "s:11test_module5Prot3P", + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.class, key.name: "C2", - key.usr: "s:11test_module2C2C" + key.usr: "s:11test_module2C2C", + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.extension.class, @@ -155,7 +166,8 @@ { key.kind: source.lang.swift.decl.function.free, key.name: "globalFunc()", - key.usr: "s:11test_module10globalFuncyyF" + key.usr: "s:11test_module10globalFuncyyF", + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.extension.class, diff --git a/test/SourceKit/Indexing/index.swift.response b/test/SourceKit/Indexing/index.swift.response index b81edd4fb070e..dd07c5020b0af 100644 --- a/test/SourceKit/Indexing/index.swift.response +++ b/test/SourceKit/Indexing/index.swift.response @@ -29,7 +29,8 @@ key.column: 5, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -50,7 +51,8 @@ key.name: "init()", key.usr: , key.line: 7, - key.column: 3 + key.column: 3, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.var.instance, @@ -75,7 +77,8 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.class, @@ -90,7 +93,8 @@ key.usr: , key.line: 9, key.column: 8, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -121,7 +125,8 @@ key.line: 10, key.column: 45 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -152,7 +157,8 @@ key.line: 13, key.column: 47 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.class, @@ -160,9 +166,11 @@ key.usr: , key.line: 16, key.column: 14, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.operator.infix, @@ -192,7 +200,8 @@ key.line: 19, key.column: 26 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.struct, @@ -206,23 +215,27 @@ key.name: "meth()", key.usr: , key.line: 24, - key.column: 8 + key.column: 8, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.static, key.name: "smeth()", key.usr: , key.line: 25, - key.column: 15 + key.column: 15, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: , key.line: 23, key.column: 8, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.enum, @@ -236,9 +249,11 @@ key.name: "EElem", key.usr: , key.line: 29, - key.column: 8 + key.column: 8, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.protocol, @@ -262,9 +277,11 @@ key.line: 33, key.column: 22 } - ] + ], + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.free, @@ -373,7 +390,8 @@ key.line: 42, key.column: 14 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.typealias, @@ -389,7 +407,8 @@ key.line: 47, key.column: 21 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.extension.class, @@ -436,7 +455,8 @@ key.line: 50, key.column: 19 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -460,7 +480,8 @@ key.line: 51, key.column: 22 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.var.instance, @@ -477,7 +498,8 @@ key.column: 18, key.is_dynamic: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -516,7 +538,8 @@ key.name: "protMeth(_:)", key.usr: } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.class, @@ -542,9 +565,11 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.var.global, @@ -567,7 +592,8 @@ key.column: 5, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.class, @@ -606,7 +632,8 @@ key.column: 5, key.is_dynamic: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -630,7 +657,8 @@ key.column: 22, key.is_dynamic: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -644,9 +672,11 @@ key.usr: , key.line: 59, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -670,16 +700,19 @@ key.line: 74, key.column: 22 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: , key.line: 73, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -750,7 +783,8 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, @@ -769,9 +803,11 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -827,16 +863,19 @@ key.line: 81, key.column: 26 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: , key.line: 80, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.free, @@ -949,7 +988,8 @@ } ] } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.struct, @@ -963,16 +1003,19 @@ key.name: "sfoo()", key.usr: , key.line: 102, - key.column: 8 + key.column: 8, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: , key.line: 101, key.column: 8, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.var.global, @@ -1004,7 +1047,8 @@ } ] } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -1044,7 +1088,8 @@ key.column: 16, key.receiver_usr: "s:5index2S2V" } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1059,16 +1104,19 @@ key.usr: , key.line: 116, key.column: 8, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: , key.line: 115, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1139,7 +1187,8 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, @@ -1158,9 +1207,11 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.free, @@ -1207,14 +1258,16 @@ key.column: 5, key.receiver_usr: "s:5index2S2V" } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, key.name: "meth()", key.usr: , key.line: 134, - key.column: 8 + key.column: 8, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1251,16 +1304,19 @@ { key.attribute: source.decl.attribute.convenience } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: , key.line: 137, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1314,7 +1370,8 @@ key.column: 11, key.receiver_usr: "s:5index3CC4C" } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, @@ -1333,9 +1390,11 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1349,7 +1408,8 @@ key.name: "init()", key.usr: , key.line: 150, - key.column: 3 + key.column: 3, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.var.instance, @@ -1406,7 +1466,8 @@ } ] } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -1415,7 +1476,8 @@ key.line: 151, key.column: 23 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1454,7 +1516,8 @@ key.line: 170, key.column: 5 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -1468,9 +1531,11 @@ key.usr: , key.line: 162, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.protocol, @@ -1510,7 +1575,8 @@ key.column: 5, key.is_dynamic: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -1519,7 +1585,8 @@ key.line: 176, key.column: 11 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1533,14 +1600,16 @@ key.usr: , key.line: 184, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } ], key.attributes: [ { key.attribute: source.decl.attribute.available } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1554,14 +1623,16 @@ key.usr: , key.line: 188, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } ], key.attributes: [ { key.attribute: source.decl.attribute.available } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -1575,14 +1646,16 @@ key.usr: , key.line: 192, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } ], key.attributes: [ { key.attribute: source.decl.attribute.available } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/index_bad_modulename.swift.response b/test/SourceKit/Indexing/index_bad_modulename.swift.response index cfa072fec71ae..f3477de5260a6 100644 --- a/test/SourceKit/Indexing/index_bad_modulename.swift.response +++ b/test/SourceKit/Indexing/index_bad_modulename.swift.response @@ -70,7 +70,8 @@ key.column: 5, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.class, diff --git a/test/SourceKit/Indexing/index_big_array.swift.response b/test/SourceKit/Indexing/index_big_array.swift.response index 4c7c18feeb99f..771e817e978e9 100644 --- a/test/SourceKit/Indexing/index_big_array.swift.response +++ b/test/SourceKit/Indexing/index_big_array.swift.response @@ -29,7 +29,8 @@ key.column: 5, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, diff --git a/test/SourceKit/Indexing/index_constructors.swift.response b/test/SourceKit/Indexing/index_constructors.swift.response index 2f5bdf7b05495..186a1efaea342 100644 --- a/test/SourceKit/Indexing/index_constructors.swift.response +++ b/test/SourceKit/Indexing/index_constructors.swift.response @@ -61,7 +61,8 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -77,9 +78,11 @@ { key.attribute: source.decl.attribute.objc } - ] + ], + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/index_effective_access_level.swift b/test/SourceKit/Indexing/index_effective_access_level.swift new file mode 100644 index 0000000000000..6f82492e44a6e --- /dev/null +++ b/test/SourceKit/Indexing/index_effective_access_level.swift @@ -0,0 +1,218 @@ +// RUN: %empty-directory(%t) +// RUN: %swift -emit-module -o %t/Exported.swiftmodule %S/Inputs/explicit-access/Exported.swift +// RUN: %swift -emit-module -o %t/Module.swiftmodule %S/Inputs/explicit-access/Module.swift -I %t + +// RUN: %sourcekitd-test -req=index %s -- -I %t %s | %sed_clean > %t.response +// RUN: %diff -u %s.response %t.response + +public enum PublicEnum { + case publicEnumCase +} + +enum InternalEnum { + case internalEnumCase +} + +fileprivate enum FilePrivateEnum { + case filePrivateEnumCase +} + +private enum PrivateEnum { + case privateEnumCase +} + +extension PublicEnum { + public func publicMethod() {} +} + +public extension PublicEnum { + func methodFromPublicExtension() {} +} + +extension InternalEnum { + func internalMethod() {} +} + +extension FilePrivateEnum { + fileprivate func filePrivateMethod() {} +} + +fileprivate extension FilePrivateEnum { + func methodFromFilePrivateExtension() {} +} + +extension PrivateEnum { + private func privateMethod() {} +} + +private extension PrivateEnum { + func methodFromPrivateExtension() {} +} + +@propertyWrapper +public struct PublicPropertyWrapper { + public var wrappedValue: T + public init(wrappedValue: T) { + self.wrappedValue = wrappedValue + } +} + +@propertyWrapper +struct InternalPropertyWrapper { + let wrappedValue: T +} + +@propertyWrapper +fileprivate struct FilePrivatePropertyWrapper { + fileprivate let wrappedValue: T +} + +@propertyWrapper +private struct PrivatePropertyWrapper { + private let wrappedValue: T +} + +private struct ScopeReducerStruct { + public init(publicInitializer: Int) {} + init(internalInitializer: Int) {} + fileprivate init(filePrivateInitializer: Int) {} + private init(privateInitializer: Int) {} + + public let publicProperty: Int = 0 + let internalProperty: Int = 0 + fileprivate let filePrivateProperty: Int = 0 + private let privateProperty: Int = 0 + public private(set) var publicPropertyWithPrivateSetter: Int = 0 + + @PublicPropertyWrapper public var publicPropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper var internalPropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper fileprivate var filePrivatePropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper private var privatePropertyWrappedProperty: Int = 0 + + public subscript(publicSubscript: Int) -> Int { return 0 } + subscript(internalSubscript: Int) -> Int { return 0 } + fileprivate subscript(filePrivateSubscript: Int) -> Int { return 0 } + private subscript(privateSubscript: Int) -> Int { return 0 } + + public func publicMethod() {} + func internalMethod() {} + fileprivate func filePrivateMethod() {} + private func privateMethod() {} +} + +public struct ScopeKeeperStruct { + public init(publicInitializer: Int) {} + init(internalInitializer: Int) {} + fileprivate init(filePrivateInitializer: Int) {} + private init(privateInitializer: Int) {} + + public let publicProperty: Int = 0 + let internalProperty: Int = 0 + fileprivate let filePrivateProperty: Int = 0 + private let privateProperty: Int = 0 + public private(set) var publicPropertyWithPrivateSetter: Int = 0 + + @PublicPropertyWrapper public var publicPropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper var internalPropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper fileprivate var filePrivatePropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper private var privatePropertyWrappedProperty: Int = 0 + + public subscript(publicSubscript: Int) -> Int { return 0 } + subscript(internalSubscript: Int) -> Int { return 0 } + fileprivate subscript(filePrivateSubscript: Int) -> Int { return 0 } + private subscript(privateSubscript: Int) -> Int { return 0 } + + public func publicMethod() {} + func internalMethod() {} + fileprivate func filePrivateMethod() {} + private func privateMethod() {} +} + +struct PartialScopeReducerStruct { + public init(publicInitializer: Int) {} + init(internalInitializer: Int) {} + fileprivate init(filePrivateInitializer: Int) {} + private init(privateInitializer: Int) {} + + public let publicProperty: Int = 0 + let internalProperty: Int = 0 + fileprivate let filePrivateProperty: Int = 0 + private let privateProperty: Int = 0 + public private(set) var publicPropertyWithPrivateSetter: Int = 0 + + @PublicPropertyWrapper public var publicPropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper var internalPropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper fileprivate var filePrivatePropertyWrappedProperty: Int = 0 + @PublicPropertyWrapper private var privatePropertyWrappedProperty: Int = 0 + + public subscript(publicSubscript: Int) -> Int { return 0 } + subscript(internalSubscript: Int) -> Int { return 0 } + fileprivate subscript(filePrivateSubscript: Int) -> Int { return 0 } + private subscript(privateSubscript: Int) -> Int { return 0 } + + public func publicMethod() {} + func internalMethod() {} + fileprivate func filePrivateMethod() {} + private func privateMethod() {} +} + +private extension PrivateEnum { + private func privateMethodFromPrivateExtension() {} +} + +public protocol PublicProtocol { + var member: Int { get set } + func method() +} + +protocol InternalProtocol { + var member: Int { get set } + func method() +} + +fileprivate protocol FilePrivateProtocol { + var member: Int { get set } + func method() +} + +private protocol PrivateProtocol { + var member: Int { get set } + func method() +} + +fileprivate struct FilePrivateImplementationOfPublicProtocol: PublicProtocol { + fileprivate var member: Int = 0 + fileprivate func method() {} +} + +open class OpenClass { + open var openProperty: Int { return 0 } + public var publicProperty: Int { return 0 } + var internalProperty: Int { return 0 } + + open func openMethod() {} + public func publicMethod() {} + func internalMethod() {} +} + +import Module + +struct InternalStruct { + let propertyReferencingPublicClassFromModule: Module.ModuleClass + let propertyReferencingPublicClassFromExportedModule: Exported.ExportedClass +} + +public typealias Alias = Int + +public var globalVariable: Int = 0 + +protocol ProtocolWithAssociatedType { + associatedtype T +} + +struct ProtocolWithAssociatedTypeImpl: ProtocolWithAssociatedType { + typealias T = Int + func testLocalContent() { + let localVariableShouldntBeIndexed = 0 + } +} diff --git a/test/SourceKit/Indexing/index_effective_access_level.swift.response b/test/SourceKit/Indexing/index_effective_access_level.swift.response new file mode 100644 index 0000000000000..2096c5271cfe6 --- /dev/null +++ b/test/SourceKit/Indexing/index_effective_access_level.swift.response @@ -0,0 +1,3782 @@ +{ + key.dependencies: [ + { + key.kind: source.lang.swift.import.module.swift, + key.name: "Swift", + key.filepath: Swift.swiftmodule, + key.is_system: 1 + }, + { + key.kind: source.lang.swift.import.module.swift, + key.name: "Module", + key.filepath: Module.swiftmodule, + key.dependencies: [ + { + key.kind: source.lang.swift.import.module.swift, + key.name: "Exported", + key.filepath: Exported.swiftmodule, + key.dependencies: [ + { + key.kind: source.lang.swift.import.module.swift, + key.name: "Swift", + key.filepath: Swift.swiftmodule, + key.is_system: 1 + }, + { + key.kind: source.lang.swift.import.module.swift, + key.name: "SwiftOnoneSupport", + key.filepath: SwiftOnoneSupport.swiftmodule, + key.is_system: 1, + key.dependencies: [ + { + key.kind: source.lang.swift.import.module.swift, + key.name: "Swift", + key.filepath: Swift.swiftmodule, + key.is_system: 1 + } + ] + } + ] + }, + { + key.kind: source.lang.swift.import.module.swift, + key.name: "Swift", + key.filepath: Swift.swiftmodule, + key.is_system: 1 + }, + { + key.kind: source.lang.swift.import.module.swift, + key.name: "SwiftOnoneSupport", + key.filepath: SwiftOnoneSupport.swiftmodule, + key.is_system: 1 + } + ] + } + ], + key.entities: [ + { + key.kind: source.lang.swift.decl.enum, + key.name: "PublicEnum", + key.usr: "s:28index_effective_access_level10PublicEnumO", + key.line: 8, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.decl.enumelement, + key.name: "publicEnumCase", + key.usr: "s:28index_effective_access_level10PublicEnumO06publicF4CaseyA2CmF", + key.line: 9, + key.column: 10, + key.effective_access: source.decl.effective_access.public + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.enum, + key.name: "InternalEnum", + key.usr: "s:28index_effective_access_level12InternalEnumO", + key.line: 12, + key.column: 6, + key.entities: [ + { + key.kind: source.lang.swift.decl.enumelement, + key.name: "internalEnumCase", + key.usr: "s:28index_effective_access_level12InternalEnumO08internalF4CaseyA2CmF", + key.line: 13, + key.column: 10, + key.effective_access: source.decl.effective_access.internal + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.enum, + key.name: "FilePrivateEnum", + key.usr: "s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 16, + key.column: 18, + key.entities: [ + { + key.kind: source.lang.swift.decl.enumelement, + key.name: "filePrivateEnumCase", + key.usr: "s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO04filefG4CaseyA2DmF", + key.line: 17, + key.column: 10, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.enum, + key.name: "PrivateEnum", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 20, + key.column: 14, + key.entities: [ + { + key.kind: source.lang.swift.decl.enumelement, + key.name: "privateEnumCase", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO07privateF4CaseyA2DmF", + key.line: 21, + key.column: 10, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "PublicEnum", + key.usr: "s:e:s:28index_effective_access_level10PublicEnumO12publicMethodyyF", + key.line: 24, + key.column: 11, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "PublicEnum", + key.usr: "s:28index_effective_access_level10PublicEnumO", + key.line: 24, + key.column: 11 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "publicMethod()", + key.usr: "s:28index_effective_access_level10PublicEnumO12publicMethodyyF", + key.line: 25, + key.column: 17, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "PublicEnum", + key.usr: "s:e:s:28index_effective_access_level10PublicEnumO010methodFromE9ExtensionyyF", + key.line: 28, + key.column: 18, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "PublicEnum", + key.usr: "s:28index_effective_access_level10PublicEnumO", + key.line: 28, + key.column: 18 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "methodFromPublicExtension()", + key.usr: "s:28index_effective_access_level10PublicEnumO010methodFromE9ExtensionyyF", + key.line: 29, + key.column: 10, + key.effective_access: source.decl.effective_access.public + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "InternalEnum", + key.usr: "s:e:s:28index_effective_access_level12InternalEnumO14internalMethodyyF", + key.line: 32, + key.column: 11, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "InternalEnum", + key.usr: "s:28index_effective_access_level12InternalEnumO", + key.line: 32, + key.column: 11 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "internalMethod()", + key.usr: "s:28index_effective_access_level12InternalEnumO14internalMethodyyF", + key.line: 33, + key.column: 10, + key.effective_access: source.decl.effective_access.internal + } + ] + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "FilePrivateEnum", + key.usr: "s:e:s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO04fileF6MethodyyF", + key.line: 36, + key.column: 11, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "FilePrivateEnum", + key.usr: "s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 36, + key.column: 11 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "filePrivateMethod()", + key.usr: "s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO04fileF6MethodyyF", + key.line: 37, + key.column: 22, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "FilePrivateEnum", + key.usr: "s:e:s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO010methodFromeF9ExtensionyyF", + key.line: 40, + key.column: 23, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "FilePrivateEnum", + key.usr: "s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 40, + key.column: 23 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "methodFromFilePrivateExtension()", + key.usr: "s:28index_effective_access_level15FilePrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO010methodFromeF9ExtensionyyF", + key.line: 41, + key.column: 10, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "PrivateEnum", + key.usr: "s:e:s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO13privateMethodyyF", + key.line: 44, + key.column: 11, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "PrivateEnum", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 44, + key.column: 11 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "privateMethod()", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO13privateMethodyyF", + key.line: 45, + key.column: 18, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "PrivateEnum", + key.usr: "s:e:s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO010methodFromE9ExtensionyyF", + key.line: 48, + key.column: 19, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "PrivateEnum", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 48, + key.column: 19 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "methodFromPrivateExtension()", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO010methodFromE9ExtensionyyF", + key.line: 49, + key.column: 10, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 53, + key.column: 15, + key.entities: [ + { + key.kind: source.lang.swift.decl.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV1Txmfp", + key.line: 53, + key.column: 37 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "wrappedValue", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValuexvp", + key.line: 54, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValuexvg", + key.line: 54, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValuexvs", + key.line: 54, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV1Txmfp", + key.line: 54, + key.column: 30 + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(wrappedValue:)", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 55, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.ref.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV1Txmfp", + key.line: 55, + key.column: 31 + }, + { + key.kind: source.lang.swift.ref.var.instance, + key.name: "wrappedValue", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValuexvp", + key.line: 56, + key.column: 14, + key.entities: [ + { + key.kind: source.lang.swift.ref.function.accessor.setter, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValuexvs", + key.line: 56, + key.column: 14, + key.receiver_usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.is_implicit: 1 + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute.propertyWrapper + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "InternalPropertyWrapper", + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV", + key.line: 61, + key.column: 8, + key.entities: [ + { + key.kind: source.lang.swift.decl.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV1Txmfp", + key.line: 61, + key.column: 32 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "wrappedValue", + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV12wrappedValuexvp", + key.line: 62, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV12wrappedValuexvg", + key.line: 62, + key.column: 9, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV12wrappedValuexvs", + key.line: 62, + key.column: 9, + key.is_implicit: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV1Txmfp", + key.line: 62, + key.column: 23 + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level23InternalPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 61, + key.column: 8, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.propertyWrapper + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "FilePrivatePropertyWrapper", + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV", + key.line: 66, + key.column: 20, + key.entities: [ + { + key.kind: source.lang.swift.decl.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV1Txmfp", + key.line: 66, + key.column: 47 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "wrappedValue", + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValuexvp", + key.line: 67, + key.column: 21, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValuexvg", + key.line: 67, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValuexvs", + key.line: 67, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV1Txmfp", + key.line: 67, + key.column: 35 + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level26FilePrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValueADyxGx_tcfc", + key.line: 66, + key.column: 20, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute.propertyWrapper + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "PrivatePropertyWrapper", + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV", + key.line: 71, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV1Txmfp", + key.line: 71, + key.column: 39 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "wrappedValue", + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValuexvp", + key.line: 72, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValuexvg", + key.line: 72, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValuexvs", + key.line: 72, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.generic_type_param, + key.name: "T", + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV1Txmfp", + key.line: 72, + key.column: 31 + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level22PrivatePropertyWrapper33_2295DDF1454D6A6D9229E8222CD85214LLV12wrappedValueADyxGx_tcfc", + key.line: 71, + key.column: 16, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.less_than_fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute.propertyWrapper + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "ScopeReducerStruct", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV", + key.line: 75, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(publicInitializer:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV17publicInitializerADSi_tcfc", + key.line: 76, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 76, + key.column: 36 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(internalInitializer:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV19internalInitializerADSi_tcfc", + key.line: 77, + key.column: 5, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 77, + key.column: 31 + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(filePrivateInitializer:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV22filePrivateInitializerADSi_tcfc", + key.line: 78, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 78, + key.column: 46 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(privateInitializer:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV18privateInitializerADSi_tcfc", + key.line: 79, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 79, + key.column: 38 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV14publicPropertySivp", + key.line: 81, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV14publicPropertySivg", + key.line: 81, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV14publicPropertySivs", + key.line: 81, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 81, + key.column: 32 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV16internalPropertySivp", + key.line: 82, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV16internalPropertySivg", + key.line: 82, + key.column: 9, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV16internalPropertySivs", + key.line: 82, + key.column: 9, + key.is_implicit: 1 + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 82, + key.column: 27 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "filePrivateProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV19filePrivatePropertySivp", + key.line: 83, + key.column: 21, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV19filePrivatePropertySivg", + key.line: 83, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV19filePrivatePropertySivs", + key.line: 83, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 83, + key.column: 42 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "privateProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV15privatePropertySivp", + key.line: 84, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV15privatePropertySivg", + key.line: 84, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV15privatePropertySivs", + key.line: 84, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 84, + key.column: 34 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicPropertyWithPrivateSetter", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV31publicPropertyWithPrivateSetterSivp", + key.line: 85, + key.column: 29, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV31publicPropertyWithPrivateSetterSivg", + key.line: 85, + key.column: 29, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV31publicPropertyWithPrivateSetterSivs", + key.line: 85, + key.column: 29, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 85, + key.column: 62 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 87, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 87, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicPropertyWrappedProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV021publicPropertyWrappedO0Sivp", + key.line: 87, + key.column: 39, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV021publicPropertyWrappedO0Sivg", + key.line: 87, + key.column: 39, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV021publicPropertyWrappedO0Sivs", + key.line: 87, + key.column: 39, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 87, + key.column: 70 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 88, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 88, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalPropertyWrappedProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV023internalPropertyWrappedO0Sivp", + key.line: 88, + key.column: 32, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV023internalPropertyWrappedO0Sivg", + key.line: 88, + key.column: 32, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV023internalPropertyWrappedO0Sivs", + key.line: 88, + key.column: 32, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 88, + key.column: 65 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 89, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 89, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "filePrivatePropertyWrappedProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV026filePrivatePropertyWrappedP0Sivp", + key.line: 89, + key.column: 44, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV026filePrivatePropertyWrappedP0Sivg", + key.line: 89, + key.column: 44, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV026filePrivatePropertyWrappedP0Sivs", + key.line: 89, + key.column: 44, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 89, + key.column: 80 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 90, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 90, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "privatePropertyWrappedProperty", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV022privatePropertyWrappedO0Sivp", + key.line: 90, + key.column: 40, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV022privatePropertyWrappedO0Sivg", + key.line: 90, + key.column: 40, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV022privatePropertyWrappedO0Sivs", + key.line: 90, + key.column: 40, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 90, + key.column: 72 + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVyS2icip", + key.line: 92, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVyS2icig", + key.line: 92, + key.column: 51 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 92, + key.column: 39 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 92, + key.column: 47 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVXeip", + key.line: 93, + key.column: 5, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVXeig", + key.line: 93, + key.column: 46 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 93, + key.column: 34 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 93, + key.column: 42 + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVXeip", + key.line: 94, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVXeig", + key.line: 94, + key.column: 61 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 94, + key.column: 49 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 94, + key.column: 57 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVXeip", + key.line: 95, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLVXeig", + key.line: 95, + key.column: 53 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 95, + key.column: 41 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 95, + key.column: 49 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "publicMethod()", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV12publicMethodyyF", + key.line: 97, + key.column: 17, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "internalMethod()", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV14internalMethodyyF", + key.line: 98, + key.column: 10, + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "filePrivateMethod()", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV17filePrivateMethodyyF", + key.line: 99, + key.column: 22, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "privateMethod()", + key.usr: "s:28index_effective_access_level18ScopeReducerStruct33_2295DDF1454D6A6D9229E8222CD85214LLV13privateMethodyyF", + key.line: 100, + key.column: 18, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "ScopeKeeperStruct", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV", + key.line: 103, + key.column: 15, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(publicInitializer:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV17publicInitializerACSi_tcfc", + key.line: 104, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 104, + key.column: 36 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(internalInitializer:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV19internalInitializerACSi_tcfc", + key.line: 105, + key.column: 5, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 105, + key.column: 31 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(filePrivateInitializer:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV22filePrivateInitializerACSi_tc33_2295DDF1454D6A6D9229E8222CD85214Llfc", + key.line: 106, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 106, + key.column: 46 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(privateInitializer:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV18privateInitializerACSi_tc33_2295DDF1454D6A6D9229E8222CD85214Llfc", + key.line: 107, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 107, + key.column: 38 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV14publicPropertySivp", + key.line: 109, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV14publicPropertySivg", + key.line: 109, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV14publicPropertySivs", + key.line: 109, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 109, + key.column: 32 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV16internalPropertySivp", + key.line: 110, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV16internalPropertySivg", + key.line: 110, + key.column: 9, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV16internalPropertySivs", + key.line: 110, + key.column: 9, + key.is_implicit: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 110, + key.column: 27 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "filePrivateProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV19filePrivateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 111, + key.column: 21, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV19filePrivateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 111, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV19filePrivateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 111, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 111, + key.column: 42 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "privateProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV15privateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 112, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV15privateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 112, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV15privateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 112, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 112, + key.column: 34 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicPropertyWithPrivateSetter", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV31publicPropertyWithPrivateSetterSivp", + key.line: 113, + key.column: 29, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV31publicPropertyWithPrivateSetterSivg", + key.line: 113, + key.column: 29, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV31publicPropertyWithPrivateSetterSivs", + key.line: 113, + key.column: 29, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 113, + key.column: 62 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 115, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 115, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicPropertyWrappedProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV021publicPropertyWrappedI0Sivp", + key.line: 115, + key.column: 39, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV021publicPropertyWrappedI0Sivg", + key.line: 115, + key.column: 39, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV021publicPropertyWrappedI0Sivs", + key.line: 115, + key.column: 39, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 115, + key.column: 70 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 116, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 116, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalPropertyWrappedProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV023internalPropertyWrappedI0Sivp", + key.line: 116, + key.column: 32, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV023internalPropertyWrappedI0Sivg", + key.line: 116, + key.column: 32, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV023internalPropertyWrappedI0Sivs", + key.line: 116, + key.column: 32, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 116, + key.column: 65 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 117, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 117, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "filePrivatePropertyWrappedProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV026filePrivatePropertyWrappedJ033_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 117, + key.column: 44, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV026filePrivatePropertyWrappedJ033_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 117, + key.column: 44, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV026filePrivatePropertyWrappedJ033_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 117, + key.column: 44, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 117, + key.column: 80 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 118, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 118, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "privatePropertyWrappedProperty", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV022privatePropertyWrappedI033_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 118, + key.column: 40, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV022privatePropertyWrappedI033_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 118, + key.column: 40, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV022privatePropertyWrappedI033_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 118, + key.column: 40, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 118, + key.column: 72 + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVyS2icip", + key.line: 120, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVyS2icig", + key.line: 120, + key.column: 51 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 120, + key.column: 39 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 120, + key.column: 47 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVXeip", + key.line: 121, + key.column: 5, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVXeig", + key.line: 121, + key.column: 46 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 121, + key.column: 34 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 121, + key.column: 42 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llip", + key.line: 122, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llig", + key.line: 122, + key.column: 61 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 122, + key.column: 49 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 122, + key.column: 57 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llip", + key.line: 123, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llig", + key.line: 123, + key.column: 53 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 123, + key.column: 41 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 123, + key.column: 49 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "publicMethod()", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV12publicMethodyyF", + key.line: 125, + key.column: 17, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "internalMethod()", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV14internalMethodyyF", + key.line: 126, + key.column: 10, + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "filePrivateMethod()", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV17filePrivateMethod33_2295DDF1454D6A6D9229E8222CD85214LLyyF", + key.line: 127, + key.column: 22, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "privateMethod()", + key.usr: "s:28index_effective_access_level17ScopeKeeperStructV13privateMethod33_2295DDF1454D6A6D9229E8222CD85214LLyyF", + key.line: 128, + key.column: 18, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "PartialScopeReducerStruct", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV", + key.line: 131, + key.column: 8, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(publicInitializer:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV17publicInitializerACSi_tcfc", + key.line: 132, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 132, + key.column: 36 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(internalInitializer:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV19internalInitializerACSi_tcfc", + key.line: 133, + key.column: 5, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 133, + key.column: 31 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(filePrivateInitializer:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV22filePrivateInitializerACSi_tc33_2295DDF1454D6A6D9229E8222CD85214Llfc", + key.line: 134, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 134, + key.column: 46 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.name: "init(privateInitializer:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV18privateInitializerACSi_tc33_2295DDF1454D6A6D9229E8222CD85214Llfc", + key.line: 135, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 135, + key.column: 38 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV14publicPropertySivp", + key.line: 137, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV14publicPropertySivg", + key.line: 137, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV14publicPropertySivs", + key.line: 137, + key.column: 16, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 137, + key.column: 32 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV16internalPropertySivp", + key.line: 138, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV16internalPropertySivg", + key.line: 138, + key.column: 9, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV16internalPropertySivs", + key.line: 138, + key.column: 9, + key.is_implicit: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 138, + key.column: 27 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "filePrivateProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV19filePrivateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 139, + key.column: 21, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV19filePrivateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 139, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV19filePrivateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 139, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 139, + key.column: 42 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "privateProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV15privateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 140, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV15privateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 140, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV15privateProperty33_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 140, + key.column: 17, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 140, + key.column: 34 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicPropertyWithPrivateSetter", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV31publicPropertyWithPrivateSetterSivp", + key.line: 141, + key.column: 29, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV31publicPropertyWithPrivateSetterSivg", + key.line: 141, + key.column: 29, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV31publicPropertyWithPrivateSetterSivs", + key.line: 141, + key.column: 29, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.setter_access.private + }, + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 141, + key.column: 62 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 143, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 143, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicPropertyWrappedProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV021publicPropertyWrappedJ0Sivp", + key.line: 143, + key.column: 39, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV021publicPropertyWrappedJ0Sivg", + key.line: 143, + key.column: 39, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV021publicPropertyWrappedJ0Sivs", + key.line: 143, + key.column: 39, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 143, + key.column: 70 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 144, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 144, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalPropertyWrappedProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV023internalPropertyWrappedJ0Sivp", + key.line: 144, + key.column: 32, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV023internalPropertyWrappedJ0Sivg", + key.line: 144, + key.column: 32, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV023internalPropertyWrappedJ0Sivs", + key.line: 144, + key.column: 32, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 144, + key.column: 65 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 145, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 145, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "filePrivatePropertyWrappedProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV026filePrivatePropertyWrappedK033_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 145, + key.column: 44, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV026filePrivatePropertyWrappedK033_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 145, + key.column: 44, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV026filePrivatePropertyWrappedK033_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 145, + key.column: 44, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 145, + key.column: 80 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "PublicPropertyWrapper", + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV", + key.line: 146, + key.column: 6 + }, + { + key.kind: source.lang.swift.ref.function.constructor, + key.usr: "s:28index_effective_access_level21PublicPropertyWrapperV12wrappedValueACyxGx_tcfc", + key.line: 146, + key.column: 6, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "privatePropertyWrappedProperty", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV022privatePropertyWrappedJ033_2295DDF1454D6A6D9229E8222CD85214LLSivp", + key.line: 146, + key.column: 40, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV022privatePropertyWrappedJ033_2295DDF1454D6A6D9229E8222CD85214LLSivg", + key.line: 146, + key.column: 40, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV022privatePropertyWrappedJ033_2295DDF1454D6A6D9229E8222CD85214LLSivs", + key.line: 146, + key.column: 40, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + }, + { + key.attribute: source.decl.attribute._custom + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 146, + key.column: 72 + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVyS2icip", + key.line: 148, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVyS2icig", + key.line: 148, + key.column: 51 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 148, + key.column: 39 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 148, + key.column: 47 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVXeip", + key.line: 149, + key.column: 5, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVXeig", + key.line: 149, + key.column: 46 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 149, + key.column: 34 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 149, + key.column: 42 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llip", + key.line: 150, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llig", + key.line: 150, + key.column: 61 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 150, + key.column: 49 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 150, + key.column: 57 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.subscript, + key.name: "subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llip", + key.line: 151, + key.column: 13, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:subscript(_:)", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructVXe33_2295DDF1454D6A6D9229E8222CD85214Llig", + key.line: 151, + key.column: 53 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 151, + key.column: 41 + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 151, + key.column: 49 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "publicMethod()", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV12publicMethodyyF", + key.line: 153, + key.column: 17, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "internalMethod()", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV14internalMethodyyF", + key.line: 154, + key.column: 10, + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "filePrivateMethod()", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV17filePrivateMethod33_2295DDF1454D6A6D9229E8222CD85214LLyyF", + key.line: 155, + key.column: 22, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "privateMethod()", + key.usr: "s:28index_effective_access_level25PartialScopeReducerStructV13privateMethod33_2295DDF1454D6A6D9229E8222CD85214LLyyF", + key.line: 156, + key.column: 18, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.extension.enum, + key.name: "PrivateEnum", + key.usr: "s:e:s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO017privateMethodFromE9ExtensionyyF", + key.line: 159, + key.column: 19, + key.entities: [ + { + key.kind: source.lang.swift.ref.enum, + key.name: "PrivateEnum", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO", + key.line: 159, + key.column: 19 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "privateMethodFromPrivateExtension()", + key.usr: "s:28index_effective_access_level11PrivateEnum33_2295DDF1454D6A6D9229E8222CD85214LLO017privateMethodFromE9ExtensionyyF", + key.line: 160, + key.column: 18, + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ] + }, + { + key.kind: source.lang.swift.decl.protocol, + key.name: "PublicProtocol", + key.usr: "s:28index_effective_access_level14PublicProtocolP", + key.line: 163, + key.column: 17, + key.entities: [ + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "member", + key.usr: "s:28index_effective_access_level14PublicProtocolP6memberSivp", + key.line: 164, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:member", + key.usr: "s:28index_effective_access_level14PublicProtocolP6memberSivg", + key.line: 164, + key.column: 23, + key.is_dynamic: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.name: "setter:member", + key.usr: "s:28index_effective_access_level14PublicProtocolP6memberSivs", + key.line: 164, + key.column: 27, + key.is_dynamic: 1 + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 164, + key.column: 17 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "method()", + key.usr: "s:28index_effective_access_level14PublicProtocolP6methodyyF", + key.line: 165, + key.column: 10, + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.public + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.protocol, + key.name: "InternalProtocol", + key.usr: "s:28index_effective_access_level16InternalProtocolP", + key.line: 168, + key.column: 10, + key.entities: [ + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "member", + key.usr: "s:28index_effective_access_level16InternalProtocolP6memberSivp", + key.line: 169, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:member", + key.usr: "s:28index_effective_access_level16InternalProtocolP6memberSivg", + key.line: 169, + key.column: 23, + key.is_dynamic: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.name: "setter:member", + key.usr: "s:28index_effective_access_level16InternalProtocolP6memberSivs", + key.line: 169, + key.column: 27, + key.is_dynamic: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 169, + key.column: 17 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "method()", + key.usr: "s:28index_effective_access_level16InternalProtocolP6methodyyF", + key.line: 170, + key.column: 10, + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.protocol, + key.name: "FilePrivateProtocol", + key.usr: "s:28index_effective_access_level19FilePrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP", + key.line: 173, + key.column: 22, + key.entities: [ + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "member", + key.usr: "s:28index_effective_access_level19FilePrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6memberSivp", + key.line: 174, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:member", + key.usr: "s:28index_effective_access_level19FilePrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6memberSivg", + key.line: 174, + key.column: 23, + key.is_dynamic: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.name: "setter:member", + key.usr: "s:28index_effective_access_level19FilePrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6memberSivs", + key.line: 174, + key.column: 27, + key.is_dynamic: 1 + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 174, + key.column: 17 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "method()", + key.usr: "s:28index_effective_access_level19FilePrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6methodyyF", + key.line: 175, + key.column: 10, + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.protocol, + key.name: "PrivateProtocol", + key.usr: "s:28index_effective_access_level15PrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP", + key.line: 178, + key.column: 18, + key.entities: [ + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "member", + key.usr: "s:28index_effective_access_level15PrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6memberSivp", + key.line: 179, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:member", + key.usr: "s:28index_effective_access_level15PrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6memberSivg", + key.line: 179, + key.column: 23, + key.is_dynamic: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.name: "setter:member", + key.usr: "s:28index_effective_access_level15PrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6memberSivs", + key.line: 179, + key.column: 27, + key.is_dynamic: 1 + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 179, + key.column: 17 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "method()", + key.usr: "s:28index_effective_access_level15PrivateProtocol33_2295DDF1454D6A6D9229E8222CD85214LLP6methodyyF", + key.line: 180, + key.column: 10, + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.private + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "FilePrivateImplementationOfPublicProtocol", + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLV", + key.line: 183, + key.column: 20, + key.related: [ + { + key.kind: source.lang.swift.ref.protocol, + key.name: "PublicProtocol", + key.usr: "s:28index_effective_access_level14PublicProtocolP", + key.line: 183, + key.column: 63 + } + ], + key.entities: [ + { + key.kind: source.lang.swift.ref.protocol, + key.name: "PublicProtocol", + key.usr: "s:28index_effective_access_level14PublicProtocolP", + key.line: 183, + key.column: 63 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "member", + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLV6memberSivp", + key.line: 184, + key.column: 21, + key.related: [ + { + key.kind: source.lang.swift.ref.var.instance, + key.name: "member", + key.usr: "s:28index_effective_access_level14PublicProtocolP6memberSivp" + } + ], + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLV6memberSivg", + key.line: 184, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLV6memberSivs", + key.line: 184, + key.column: 21, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 184, + key.column: 29 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "method()", + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLV6methodyyF", + key.line: 185, + key.column: 22, + key.related: [ + { + key.kind: source.lang.swift.ref.function.method.instance, + key.name: "method()", + key.usr: "s:28index_effective_access_level14PublicProtocolP6methodyyF" + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLV6memberADSi_tcfc", + key.line: 183, + key.column: 20, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level41FilePrivateImplementationOfPublicProtocol33_2295DDF1454D6A6D9229E8222CD85214LLVADycfc", + key.line: 183, + key.column: 20, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.fileprivate + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.fileprivate + } + ], + key.effective_access: source.decl.effective_access.fileprivate + }, + { + key.kind: source.lang.swift.decl.class, + key.name: "OpenClass", + key.usr: "s:28index_effective_access_level9OpenClassC", + key.line: 188, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "openProperty", + key.usr: "s:28index_effective_access_level9OpenClassC12openPropertySivp", + key.line: 189, + key.column: 14, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:openProperty", + key.usr: "s:28index_effective_access_level9OpenClassC12openPropertySivg", + key.line: 189, + key.column: 32, + key.is_dynamic: 1 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.open + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 189, + key.column: 28 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "publicProperty", + key.usr: "s:28index_effective_access_level9OpenClassC14publicPropertySivp", + key.line: 190, + key.column: 16, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:publicProperty", + key.usr: "s:28index_effective_access_level9OpenClassC14publicPropertySivg", + key.line: 190, + key.column: 36, + key.is_dynamic: 1 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 190, + key.column: 32 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "internalProperty", + key.usr: "s:28index_effective_access_level9OpenClassC16internalPropertySivp", + key.line: 191, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.name: "getter:internalProperty", + key.usr: "s:28index_effective_access_level9OpenClassC16internalPropertySivg", + key.line: 191, + key.column: 31, + key.is_dynamic: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 191, + key.column: 27 + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "openMethod()", + key.usr: "s:28index_effective_access_level9OpenClassC10openMethodyyF", + key.line: 193, + key.column: 15, + key.is_dynamic: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.open + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "publicMethod()", + key.usr: "s:28index_effective_access_level9OpenClassC12publicMethodyyF", + key.line: 194, + key.column: 17, + key.is_dynamic: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "internalMethod()", + key.usr: "s:28index_effective_access_level9OpenClassC14internalMethodyyF", + key.line: 195, + key.column: 10, + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level9OpenClassCACycfc", + key.line: 188, + key.column: 12, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.open + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.module, + key.name: "Module", + key.usr: "c:@M@Module", + key.line: 198, + key.column: 8 + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "InternalStruct", + key.usr: "s:28index_effective_access_level14InternalStructV", + key.line: 200, + key.column: 8, + key.entities: [ + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "propertyReferencingPublicClassFromModule", + key.usr: "s:28index_effective_access_level14InternalStructV40propertyReferencingPublicClassFromModule0L00lJ0Cvp", + key.line: 201, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level14InternalStructV40propertyReferencingPublicClassFromModule0L00lJ0Cvg", + key.line: 201, + key.column: 9, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level14InternalStructV40propertyReferencingPublicClassFromModule0L00lJ0Cvs", + key.line: 201, + key.column: 9, + key.is_implicit: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.module, + key.name: "Module", + key.usr: "c:@M@Module", + key.line: 201, + key.column: 51 + }, + { + key.kind: source.lang.swift.ref.class, + key.name: "ModuleClass", + key.usr: "s:6Module0A5ClassC", + key.line: 201, + key.column: 58 + }, + { + key.kind: source.lang.swift.decl.var.instance, + key.name: "propertyReferencingPublicClassFromExportedModule", + key.usr: "s:28index_effective_access_level14InternalStructV48propertyReferencingPublicClassFromExportedModule0L00lJ0Cvp", + key.line: 202, + key.column: 9, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level14InternalStructV48propertyReferencingPublicClassFromExportedModule0L00lJ0Cvg", + key.line: 202, + key.column: 9, + key.is_implicit: 1 + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level14InternalStructV48propertyReferencingPublicClassFromExportedModule0L00lJ0Cvs", + key.line: 202, + key.column: 9, + key.is_implicit: 1 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.ref.module, + key.name: "Exported", + key.usr: "c:@M@Exported", + key.line: 202, + key.column: 59 + }, + { + key.kind: source.lang.swift.ref.class, + key.name: "ExportedClass", + key.usr: "s:8Exported0A5ClassC", + key.line: 202, + key.column: 68 + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level14InternalStructV40propertyReferencingPublicClassFromModule0ghijk8ExportedL0AC0L00lJ0C_0M00mJ0Ctcfc", + key.line: 200, + key.column: 8, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.typealias, + key.name: "Alias", + key.usr: "s:28index_effective_access_level5Aliasa", + key.line: 205, + key.column: 18, + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 205, + key.column: 26 + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.decl.var.global, + key.name: "globalVariable", + key.usr: "s:28index_effective_access_level14globalVariableSivp", + key.line: 207, + key.column: 12, + key.entities: [ + { + key.kind: source.lang.swift.decl.function.accessor.getter, + key.usr: "s:28index_effective_access_level14globalVariableSivg", + key.line: 207, + key.column: 12, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + }, + { + key.kind: source.lang.swift.decl.function.accessor.setter, + key.usr: "s:28index_effective_access_level14globalVariableSivs", + key.line: 207, + key.column: 12, + key.is_implicit: 1, + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ] + } + ], + key.attributes: [ + { + key.attribute: source.decl.attribute.public + } + ], + key.effective_access: source.decl.effective_access.public + }, + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 207, + key.column: 28 + }, + { + key.kind: source.lang.swift.decl.protocol, + key.name: "ProtocolWithAssociatedType", + key.usr: "s:28index_effective_access_level26ProtocolWithAssociatedTypeP", + key.line: 209, + key.column: 10, + key.entities: [ + { + key.kind: source.lang.swift.decl.associatedtype, + key.name: "T", + key.usr: "s:28index_effective_access_level26ProtocolWithAssociatedTypeP1TQa", + key.line: 210, + key.column: 20, + key.effective_access: source.decl.effective_access.internal + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.struct, + key.name: "ProtocolWithAssociatedTypeImpl", + key.usr: "s:28index_effective_access_level30ProtocolWithAssociatedTypeImplV", + key.line: 213, + key.column: 8, + key.related: [ + { + key.kind: source.lang.swift.ref.protocol, + key.name: "ProtocolWithAssociatedType", + key.usr: "s:28index_effective_access_level26ProtocolWithAssociatedTypeP", + key.line: 213, + key.column: 40 + } + ], + key.entities: [ + { + key.kind: source.lang.swift.ref.protocol, + key.name: "ProtocolWithAssociatedType", + key.usr: "s:28index_effective_access_level26ProtocolWithAssociatedTypeP", + key.line: 213, + key.column: 40 + }, + { + key.kind: source.lang.swift.decl.typealias, + key.name: "T", + key.usr: "s:28index_effective_access_level30ProtocolWithAssociatedTypeImplV1Ta", + key.line: 214, + key.column: 15, + key.related: [ + { + key.kind: source.lang.swift.ref.associatedtype, + key.name: "T", + key.usr: "s:28index_effective_access_level26ProtocolWithAssociatedTypeP1TQa" + } + ], + key.entities: [ + { + key.kind: source.lang.swift.ref.struct, + key.name: "Int", + key.usr: "s:Si", + key.line: 214, + key.column: 19 + } + ], + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.method.instance, + key.name: "testLocalContent()", + key.usr: "s:28index_effective_access_level30ProtocolWithAssociatedTypeImplV16testLocalContentyyF", + key.line: 215, + key.column: 10, + key.effective_access: source.decl.effective_access.internal + }, + { + key.kind: source.lang.swift.decl.function.constructor, + key.usr: "s:28index_effective_access_level30ProtocolWithAssociatedTypeImplVACycfc", + key.line: 213, + key.column: 8, + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal + } + ], + key.effective_access: source.decl.effective_access.internal + } + ] +} diff --git a/test/SourceKit/Indexing/index_enum_case.swift.response b/test/SourceKit/Indexing/index_enum_case.swift.response index 7e85204ca105b..a5a53d1769c51 100644 --- a/test/SourceKit/Indexing/index_enum_case.swift.response +++ b/test/SourceKit/Indexing/index_enum_case.swift.response @@ -20,7 +20,8 @@ key.name: "one", key.usr: "s:15index_enum_case1EO3oneyA2CmF", key.line: 6, - key.column: 10 + key.column: 10, + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.enumelement, @@ -36,14 +37,16 @@ key.line: 6, key.column: 22 } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.enumelement, key.name: "three", key.usr: "s:15index_enum_case1EO5threeyA2CmF", key.line: 6, - key.column: 31 + key.column: 31, + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.var.instance, @@ -82,7 +85,8 @@ } ] } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -96,7 +100,8 @@ { key.attribute: source.decl.attribute.public } - ] + ], + key.effective_access: source.decl.effective_access.public }, { key.kind: source.lang.swift.decl.var.global, @@ -119,7 +124,8 @@ key.column: 5, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.enum, @@ -156,7 +162,8 @@ key.line: 28, key.column: 12 } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/index_forbid_typecheck.swift.response b/test/SourceKit/Indexing/index_forbid_typecheck.swift.response index 3417ee82d5690..935c7a75acc93 100644 --- a/test/SourceKit/Indexing/index_forbid_typecheck.swift.response +++ b/test/SourceKit/Indexing/index_forbid_typecheck.swift.response @@ -29,7 +29,8 @@ key.column: 5, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.var.global, @@ -93,7 +94,8 @@ } ] } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/index_func_import.swift.response b/test/SourceKit/Indexing/index_func_import.swift.response index abfae5f82e293..d2746122538ab 100644 --- a/test/SourceKit/Indexing/index_func_import.swift.response +++ b/test/SourceKit/Indexing/index_func_import.swift.response @@ -63,7 +63,8 @@ key.line: 10, key.column: 3 } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/index_is_test_candidate.swift.response b/test/SourceKit/Indexing/index_is_test_candidate.swift.response index 56b0ab8bf1ca4..5be0064ed2945 100644 --- a/test/SourceKit/Indexing/index_is_test_candidate.swift.response +++ b/test/SourceKit/Indexing/index_is_test_candidate.swift.response @@ -13,7 +13,8 @@ key.name: "test_takesNoParams_andReturnsVoid_butIsNotAnInstanceMethod()", key.usr: "s:23index_is_test_candidate0C54_takesNoParams_andReturnsVoid_butIsNotAnInstanceMethodyyF", key.line: 10, - key.column: 6 + key.column: 6, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.struct, @@ -27,16 +28,19 @@ key.name: "test_startsWithTest_takesNoParams_returnsVoid_butIsDefinedOnAStruct()", key.usr: "s:23index_is_test_candidate8MyStructV0C63_startsWithTest_takesNoParams_returnsVoid_butIsDefinedOnAStructyyF", key.line: 13, - key.column: 8 + key.column: 8, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: "s:23index_is_test_candidate8MyStructVACycfc", key.line: 12, key.column: 8, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -50,9 +54,11 @@ key.usr: "s:23index_is_test_candidate10XCTestCaseCACycfc", key.line: 15, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -83,7 +89,8 @@ key.usr: "s:23index_is_test_candidate14MyPrivateClass33_E06F4E7BC5F577AB6E2EC6D3ECA1C8B9LLC0c47_startsWithTest_takesNoParams_returnsVoid_butIsF0yyF", key.line: 17, key.column: 8, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.fileprivate }, { key.kind: source.lang.swift.decl.function.constructor, @@ -102,7 +109,8 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.fileprivate } ], key.attributes: [ @@ -110,7 +118,8 @@ key.attribute: source.decl.attribute.private } ], - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.fileprivate }, { key.kind: source.lang.swift.decl.class, @@ -141,7 +150,8 @@ key.usr: "s:23index_is_test_candidate7MyClassC20doesNotStartWithTestyyF", key.line: 21, key.column: 8, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -158,7 +168,8 @@ key.line: 22, key.column: 50 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -175,7 +186,8 @@ key.line: 23, key.column: 68 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -188,7 +200,8 @@ { key.attribute: source.decl.attribute.private } - ] + ], + key.effective_access: source.decl.effective_access.less_than_fileprivate }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -197,7 +210,8 @@ key.line: 25, key.column: 8, key.is_dynamic: 1, - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -206,7 +220,8 @@ key.line: 26, key.column: 8, key.is_dynamic: 1, - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, @@ -225,7 +240,8 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal } ], key.attributes: [ @@ -233,7 +249,8 @@ key.attribute: source.decl.attribute.public } ], - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.public } ] } diff --git a/test/SourceKit/Indexing/index_is_test_candidate_objc.swift.response b/test/SourceKit/Indexing/index_is_test_candidate_objc.swift.response index 787cc50b45388..c6a988f0ff967 100644 --- a/test/SourceKit/Indexing/index_is_test_candidate_objc.swift.response +++ b/test/SourceKit/Indexing/index_is_test_candidate_objc.swift.response @@ -13,7 +13,8 @@ key.name: "test_takesNoParams_andReturnsVoid_butIsNotAnInstanceMethod()", key.usr: "s:28index_is_test_candidate_objc0C54_takesNoParams_andReturnsVoid_butIsNotAnInstanceMethodyyF", key.line: 9, - key.column: 6 + key.column: 6, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.struct, @@ -27,16 +28,19 @@ key.name: "test_startsWithTest_takesNoParams_returnsVoid_butIsDefinedOnAStruct()", key.usr: "s:28index_is_test_candidate_objc8MyStructV0C63_startsWithTest_takesNoParams_returnsVoid_butIsDefinedOnAStructyyF", key.line: 12, - key.column: 8 + key.column: 8, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: "s:28index_is_test_candidate_objc8MyStructVACycfc", key.line: 11, key.column: 8, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -50,9 +54,11 @@ key.usr: "s:28index_is_test_candidate_objc10XCTestCaseCACycfc", key.line: 14, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -84,7 +90,8 @@ key.line: 16, key.column: 8, key.is_dynamic: 1, - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.fileprivate }, { key.kind: source.lang.swift.decl.function.constructor, @@ -103,7 +110,8 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.fileprivate } ], key.attributes: [ @@ -111,7 +119,8 @@ key.attribute: source.decl.attribute.private } ], - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.fileprivate }, { key.kind: source.lang.swift.decl.class, @@ -142,7 +151,8 @@ key.usr: "s:28index_is_test_candidate_objc7MyClassC20doesNotStartWithTestyyF", key.line: 20, key.column: 8, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -159,7 +169,8 @@ key.line: 21, key.column: 50 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -176,7 +187,8 @@ key.line: 22, key.column: 68 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -190,7 +202,8 @@ key.attribute: source.decl.attribute.private } ], - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.less_than_fileprivate }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -199,7 +212,8 @@ key.line: 24, key.column: 8, key.is_dynamic: 1, - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -208,7 +222,8 @@ key.line: 25, key.column: 8, key.is_dynamic: 1, - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, @@ -227,7 +242,8 @@ { key.attribute: source.decl.attribute.override } - ] + ], + key.effective_access: source.decl.effective_access.internal } ], key.attributes: [ @@ -235,7 +251,8 @@ key.attribute: source.decl.attribute.public } ], - key.is_test_candidate: 1 + key.is_test_candidate: 1, + key.effective_access: source.decl.effective_access.public } ] } diff --git a/test/SourceKit/Indexing/index_objcMembers.swift.response b/test/SourceKit/Indexing/index_objcMembers.swift.response index a75108f1f1995..ce2578223cde7 100644 --- a/test/SourceKit/Indexing/index_objcMembers.swift.response +++ b/test/SourceKit/Indexing/index_objcMembers.swift.response @@ -38,7 +38,8 @@ key.is_dynamic: 1, key.is_implicit: 1 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.ref.struct, @@ -58,7 +59,8 @@ { key.attribute: source.decl.attribute.objc } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, @@ -70,14 +72,16 @@ { key.attribute: source.decl.attribute.objc } - ] + ], + key.effective_access: source.decl.effective_access.internal } ], key.attributes: [ { key.attribute: source.decl.attribute.objcMembers } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/index_operators.swift.response b/test/SourceKit/Indexing/index_operators.swift.response index 20027550b270d..0f528bb5faec0 100644 --- a/test/SourceKit/Indexing/index_operators.swift.response +++ b/test/SourceKit/Indexing/index_operators.swift.response @@ -20,9 +20,11 @@ key.name: "init()", key.usr: "s:15index_operators6ClassACACycfc", key.line: 5, - key.column: 5 + key.column: 5, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.operator.infix, @@ -52,7 +54,8 @@ key.line: 8, key.column: 37 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.struct, @@ -111,7 +114,8 @@ key.column: 19, key.receiver_usr: "s:15index_operators7StructBV" } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.operator.infix, @@ -146,16 +150,19 @@ { key.attribute: source.decl.attribute.public } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: "s:15index_operators7StructBVACycfc", key.line: 12, key.column: 8, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/rdar_21602898.swift.response b/test/SourceKit/Indexing/rdar_21602898.swift.response index 92cab6155bada..85493ddd51e88 100644 --- a/test/SourceKit/Indexing/rdar_21602898.swift.response +++ b/test/SourceKit/Indexing/rdar_21602898.swift.response @@ -13,7 +13,8 @@ key.name: "P", key.usr: "s:13rdar_216028981PP", key.line: 4, - key.column: 10 + key.column: 10, + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.class, @@ -64,9 +65,11 @@ key.usr: "s:13rdar_216028981CCACycfc", key.line: 5, key.column: 7, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/test/SourceKit/Indexing/sr_3815.swift.response b/test/SourceKit/Indexing/sr_3815.swift.response index 5100a76945673..77ac159b14d65 100644 --- a/test/SourceKit/Indexing/sr_3815.swift.response +++ b/test/SourceKit/Indexing/sr_3815.swift.response @@ -29,7 +29,8 @@ key.line: 5, key.column: 21 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -37,9 +38,11 @@ key.usr: "s:7sr_38151PP1fyyF", key.line: 6, key.column: 8, - key.is_dynamic: 1 + key.is_dynamic: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.struct, @@ -78,7 +81,8 @@ key.line: 10, key.column: 21 } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.method.instance, @@ -92,16 +96,19 @@ key.name: "f()", key.usr: "s:7sr_38151PP1fyyF" } - ] + ], + key.effective_access: source.decl.effective_access.internal }, { key.kind: source.lang.swift.decl.function.constructor, key.usr: "s:7sr_38151SVACycfc", key.line: 9, key.column: 8, - key.is_implicit: 1 + key.is_implicit: 1, + key.effective_access: source.decl.effective_access.internal } - ] + ], + key.effective_access: source.decl.effective_access.internal } ] } diff --git a/tools/SourceKit/include/SourceKit/Core/LangSupport.h b/tools/SourceKit/include/SourceKit/Core/LangSupport.h index a30759b298842..7bfbd371d9e49 100644 --- a/tools/SourceKit/include/SourceKit/Core/LangSupport.h +++ b/tools/SourceKit/include/SourceKit/Core/LangSupport.h @@ -51,6 +51,7 @@ struct EntityInfo { unsigned Line = 0; unsigned Column = 0; ArrayRef Attrs; + Optional EffectiveAccess; EntityInfo() = default; }; diff --git a/tools/SourceKit/lib/SwiftLang/SwiftIndexing.cpp b/tools/SourceKit/lib/SwiftLang/SwiftIndexing.cpp index 42ba21b268786..deff6db7eef8f 100644 --- a/tools/SourceKit/lib/SwiftLang/SwiftIndexing.cpp +++ b/tools/SourceKit/lib/SwiftLang/SwiftIndexing.cpp @@ -134,10 +134,54 @@ class SKIndexDataConsumer : public IndexDataConsumer { if (!isRef) { uidAttrs = getDeclAttributeUIDs(symbol.decl); info.Attrs = uidAttrs; + if (auto *VD = dyn_cast(symbol.decl)) { + if (shouldOutputEffectiveAccessOfValueSymbol(symbol.symInfo)) { + AccessScope accessScope = VD->getFormalAccessScope(); + UIdent AttrUID = SwiftLangSupport::getUIDForFormalAccessScope(accessScope); + info.EffectiveAccess = AttrUID; + } + } } return func(info); } + bool shouldOutputEffectiveAccessOfValueSymbol(SymbolInfo Info) { + SymbolKind Kind = Info.Kind; + SymbolSubKind SubKind = Info.SubKind; + switch (SubKind) { + case SymbolSubKind::AccessorGetter: + case SymbolSubKind::AccessorSetter: + case SymbolSubKind::SwiftAccessorWillSet: + case SymbolSubKind::SwiftAccessorDidSet: + case SymbolSubKind::SwiftAccessorAddressor: + case SymbolSubKind::SwiftAccessorMutableAddressor: + case SymbolSubKind::SwiftGenericTypeParam: + return false; + default: + break; + } + switch (Kind) { + case SymbolKind::Enum: + case SymbolKind::Struct: + case SymbolKind::Class: + case SymbolKind::Protocol: + case SymbolKind::Constructor: + case SymbolKind::EnumConstant: + case SymbolKind::Function: + case SymbolKind::StaticMethod: + case SymbolKind::Variable: + case SymbolKind::InstanceMethod: + case SymbolKind::ClassMethod: + case SymbolKind::InstanceProperty: + case SymbolKind::ClassProperty: + case SymbolKind::StaticProperty: + case SymbolKind::TypeAlias: + return true; + default: + return false; + } + } + template bool withEntityInfo(const IndexRelation &relation, F func) { EntityInfo info; diff --git a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp index 8fea7e661c542..f2becfabbef1c 100644 --- a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp +++ b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp @@ -82,6 +82,10 @@ static UIdent Attr_Setter_FilePrivate("source.decl.attribute.setter_access.filep static UIdent Attr_Setter_Internal("source.decl.attribute.setter_access.internal"); static UIdent Attr_Setter_Public("source.decl.attribute.setter_access.public"); static UIdent Attr_Setter_Open("source.decl.attribute.setter_access.open"); +static UIdent EffectiveAccess_Public("source.decl.effective_access.public"); +static UIdent EffectiveAccess_Internal("source.decl.effective_access.internal"); +static UIdent EffectiveAccess_FilePrivate("source.decl.effective_access.fileprivate"); +static UIdent EffectiveAccess_LessThanFilePrivate("source.decl.effective_access.less_than_fileprivate"); std::unique_ptr SourceKit::createSwiftLangSupport(SourceKit::Context &SKCtx) { @@ -808,6 +812,20 @@ Optional SwiftLangSupport::getUIDForDeclAttribute(const swift::DeclAttri return None; } +UIdent SwiftLangSupport::getUIDForFormalAccessScope(const swift::AccessScope Scope) { + if (Scope.isPublic()) { + return EffectiveAccess_Public; + } else if (Scope.isInternal()) { + return EffectiveAccess_Internal; + } else if (Scope.isFileScope()) { + return EffectiveAccess_FilePrivate; + } else if (Scope.isPrivate()) { + return EffectiveAccess_LessThanFilePrivate; + } else { + llvm_unreachable("Unsupported access scope"); + } +} + std::vector SwiftLangSupport::UIDsFromDeclAttributes(const DeclAttributes &Attrs) { std::vector AttrUIDs; diff --git a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h index ed616892598fb..c80533b175cdc 100644 --- a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h +++ b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h @@ -383,6 +383,8 @@ class SwiftLangSupport : public LangSupport { static Optional getUIDForDeclAttribute(const swift::DeclAttribute *Attr); + static SourceKit::UIdent getUIDForFormalAccessScope(const swift::AccessScope Scope); + static std::vector UIDsFromDeclAttributes(const swift::DeclAttributes &Attrs); static SourceKit::UIdent getUIDForNameKind(swift::ide::NameKind Kind); diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp b/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp index 46e4ab3d83012..e388918ef6a49 100644 --- a/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp +++ b/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp @@ -1355,6 +1355,9 @@ bool SKIndexingConsumer::startSourceEntity(const EntityInfo &Info) { } } + if (Info.EffectiveAccess) + Elem.set(KeyEffectiveAccess, Info.EffectiveAccess.getValue()); + EntitiesStack.push_back({ Info.Kind, Elem, ResponseBuilder::Array(), ResponseBuilder::Array()}); return true; diff --git a/utils/gyb_sourcekit_support/UIDs.py b/utils/gyb_sourcekit_support/UIDs.py index 974544dbbb111..eeed7c7f27ba0 100644 --- a/utils/gyb_sourcekit_support/UIDs.py +++ b/utils/gyb_sourcekit_support/UIDs.py @@ -183,6 +183,7 @@ def __init__(self, internal_name, external_name): 'key.completion_check_dependency_interval'), KEY('AnnotatedTypename', 'key.annotated.typename'), KEY('CompileOperation', 'key.compile_operation'), + KEY('EffectiveAccess', 'key.effective_access'), ]