Swift 5 migration: Fix switch warnings

We now get a warning when switching over enums from system
frameworks even when we handle all public cases because
there can be future cases that aren't handled.

When such a future case is introduced, we'll get a warning.

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander
2019-04-08 15:18:26 +05:30
parent db876647d6
commit d9e88c51bd
3 changed files with 12 additions and 0 deletions
+6
View File
@@ -36,6 +36,8 @@ extension Endpoint {
return "\(address):\(port)"
case .ipv6(let address):
return "[\(address)]:\(port)"
@unknown default:
fatalError()
}
}
@@ -78,6 +80,8 @@ extension Endpoint {
return true
case .ipv6:
return true
@unknown default:
fatalError()
}
}
@@ -89,6 +93,8 @@ extension Endpoint {
return nil
case .ipv6:
return nil
@unknown default:
fatalError()
}
}
}