// Sample source consumed by PublicMemberScannerTests via on-disk reads.
// Not actually compiled — file extension intentionally `.swift.txt` so SPM
// doesn't pick it up. The test renames a temp copy to `.swift` for the scan.

public struct SampleDescriptor {
    public func name() -> String { "" }
    public var nameOptional: String? { nil }
    public init(layout: SampleLayout, offset: Int) {}
    public init(custom: Int) {}
    internal func internalHelper() {}
    private var hidden: Int { 0 }
}

extension SampleDescriptor {
    public func sectionedFoo() -> Int { 0 }
}

extension SampleDescriptor {
    public subscript(dynamicMember key: String) -> Int { 0 }
}

@_spi(Internals)
extension SampleDescriptor {
    public func spiHidden() -> Int { 0 }
}

public struct SampleDescriptorWithNestedLayout {
    public struct Layout {
        public static func offset(of field: PartialKeyPath<Layout>) -> Int { 0 }
    }
}
