struct May { private init() {} static let may = May() } struct Throw { private init() {} static let `throw` = Throw() } func getCat(_ o: May = .may) -> Cat? { return Cat() } func getCat(_ o: Throw = .throw) throws -> Cat { return Cat() }
引数で明示できるようにしてみた