protocol Bar { static func decode(string: String) -> Self? } extension NSRegularExpression: Bar { static func decode(string: String) -> NSRegularExpression? { return try? NSRegularExpression(pattern: string, options: .caseInsensitive) } }
error: method 'decode(string:)' in non-final class 'NSRegularExpression' must return
Self to conform to protocol 'Bar' static func decode(string: String) -> NSRegularExpression? {