You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In swift, we use switch in enums to populate computed properties.Rules should be created to cleanup any enum entry from all such variables.
example:
Before
enum TestEnum {
case one
case two
case three
var v1: String {
switch self {
case .one:
return "one"
case .two:
return "two"
case .three:
return "three"
}
}
}
After
enum TestEnum {
case two
case three
var v1: String {
switch self {
case .two:
return "two"
case .three:
return "three"
}
}
}
The text was updated successfully, but these errors were encountered:
In swift, we use switch in enums to populate computed properties.Rules should be created to cleanup any enum entry from all such variables.
example:
Before
After
The text was updated successfully, but these errors were encountered: