Avatar
Avatar
Iceman
@swift-5.5.3 import XCTest let c3: () -> () = { XCTAssertNoThrow(try Result<Int, Error>.success(1).get()) } func c4() { XCTAssertNoThrow(try Result<Int, Error>.success(1).get()) } print(type(of: c3)) print(type(of: c4))
exit status: 1 with stderr:<stdin>:3:20: error: invalid conversion from throwing function of type '() throws -> ()' to non-throwing function type '() -> ()' let c3: () -> () = { ^