I got an error I do not understand, as I thought I understood unwrapping a conditional var/let. But when I try to force unwrap it in the if I get the supplied error.
Error:
Initializer for conditional binding must have Optional type, not 'String'
Code:
let imNotSet: String?
print(type(of: imNotSet)) // Optional<String>
if let unwrappedVar = imNotSet! { // error on this line
print(unwrappedVar)
}