When I write
let x: Int
switch x {
default:
print("x")
}
I get this error: error: constant 'x' used before being initialized
When I write
let x: Never
print(x)
I get this error: error: constant 'x' used before being initialized
But when I write
let x: Never
switch x {
default:
print("x")
}
I don’t get an error, but running the program results in a crash.
Why is this?