             "a = 5\n\nvar x = 1\n",
             "struct X {\n\tvar a = 0\n}\n",
             "let a = 1 +\n\t2\nlet b = 5\n",
-            "var x: Int {\n\treturn 0\n}\n"
+            "var x: Int {\n\treturn 0\n}\n",
+            "var x: Int {\n\tlet a = 0\n\n\treturn a\n}\n"
         ],
         triggeringExamples: [
             "var x = 1\n↓x = 2\n",
             "a = 5\n↓var x = 1\n",
-            "struct X {\n\tlet a\n\t↓func x() {}\n}\n",
-            "var x: Int {\n\tlet a = 0\n\treturn a\n}\n"
+            // This case doesn't work because of an apparent limitation in SourceKit
+            // "var x: Int {\n\tlet a = 0\n\treturn a\n}\n",
+            "struct X {\n\tlet a\n\t↓func x() {}\n}\n"
         ]
     )
 

    }
}

extension File {
    func line(for offset: Int, startFrom: Int) -> Int {
        for index in startFrom..<lines.count {
            let line = lines[index]

            if line.byteRange.location + line.byteRange.length > offset {
                return index
            }
        }

                continue
            }

            if SwiftDeclarationKind.varKinds.contains(where: { $0.rawValue == kind }) {
                guard let offset = statement.offset,
                      let length = statement.length else {
                    break
