Swift supports static and mutating methods associated with enumerations. Here is code that works in xCode.
But in Fire v 8.2.89.1909, it results in compile time error “No matching overload”.
enum Device {
case AppleWatch, iPad, iPhone
static func fromSlang(term: String) -> Device? {
if term == "iWatch" {
return .AppleWatch
}
return nil
}
}
print (Device.fromSlang("iWatch")) <--- No matching overload in Silver.
It should return -> Device.AppleWatch
Detailed error message: error E399: No overloaded method “fromSlang” with 1 parameter on type “MainActivity!.Device”