Why does Swift allows to compile code with Never as an input argument?

@escaping (Never) -> Void is not an uninhabited type, since the closure { (_: Never) in } is a valid witness. Also, since bar() has an empty body, the warning would not be emitted even if the argument type were uninhabited.

2 Likes