             case let start = nameOffset + nameLength,
             case let length = bodyOffset - start,
             let range = contents.byteRangeToNSRange(start: start, length: length),
-            let match = pattern.firstMatch(in: file.contents, options: [], range: range)?.rangeAt(1) else {
+            let match = genericTypeRegex.firstMatch(in: file.contents, options: [], range: range)?.rangeAt(1) else {
                 return []
         }
 

        }
    )

    private let pattern = regex("<(\\s*\\w.*?)>")

    public func validateFile(_ file: File,
                             kind: SwiftDeclarationKind,

            let length = (dictionary["key.namelength"] as? Int64).flatMap({ Int($0) }),
            case let contents = file.contents.bridge(),
            let range = contents.byteRangeToNSRange(start: offset, length: length),
            let match = genericTypeRegex.firstMatch(in: file.contents, options: [], range: range)?.rangeAt(1),
            match.location < minParameterOffset(parameters: dictionary.enclosedVarParameters, file: file) else {
            return []
        }
