             "#if os(macOS)\nlet a = 0\n#endif\n",
             "@available(swift 4)\nlet a = 0\n",
             "class C {\n\t@objc\n\tvar s: String = \"\"\n}",
-            "class C {\n\tvar x = 0\n\tlazy\n\tvar y = 0\n}\n"
+            "class C {\n\t@objc\n\tfunc a() {}\n}",
+            "class C {\n\tvar x = 0\n\tlazy\n\tvar y = 0\n}\n",
+            "@available(OSX, introduced: 10.6)\n@available(*, deprecated)\nvar x = 0\n"
         ],
         triggeringExamples: [
             "var x = 1\n↓x = 2\n",

    // Collects all the line numbers containing attributes but not declarations
    // other than let/var
    private func attributeLineNumbers(file: File) -> Set<Int> {
        let matches = file.match(pattern: "[@a-z]+", with: [.attributeBuiltin])
        let matchLines = matches.map { file.line(offset: $0.location) }

        return Set<Int>(matchLines)

                }
            }
            if SwiftDeclarationKind.varKinds.contains(where: { $0.rawValue == kind }) {
                var lines = Set(startLine...((endLine < 0) ? file.lines.count : endLine))
                var previousLine = startLine - 1

                // Include preceding attributes
                while attributeLines.contains(previousLine) {
                    lines.insert(previousLine)
                    attributeLines.remove(previousLine)
                    previousLine -= 1
                }

                // Exclude the body where the accessors are
