enum Material { case fire case water init?(_ x: Int) { self = .fire } init(_ y: String) throws { self = .water } } func g(_ material: Material) {} try g(.init(""))