Avatar
norio_nomura 5/2/2017 6:59 AM
Linux用のテストを返すallTests の定義で throws ではないメソッドを返す時にエラーが出る様になった。 extension ResolverTests { static var allTests: [(String, (ResolverTests) -> () throws -> Void)] { return [ ("testBasic", testBasic), ("testDefault", testDefault) ] // .map { entry in (entry.0, { entry.1($0) }) } // workaround } } … error: cannot convert value of type '(ResolverTests) -> () -> ()' to expected element type '(ResolverTests) -> () throws -> Void' ("testBasic", testBasic), ^~~~~~~~~ (edited)