Avatar
enum Animal : Int { case cat = 2 case dog = 3 } func f(_ animal: Animal) {} // ok f(Animal.init(rawValue: 3)!) // error: iOSGround.playground:7:21: error: type of expression is ambiguous without more context f(.init(rawValue: 3)!)
8:22 AM
これ最近困ってるんですよね。そういうもんだっけ。