In the following code why is expectingThisToBeOptional of type String and not of type String! when getOptional() is returning a String!
func getOptional() -> String!
{
var s:String! = "Hello"
return s
}
if let expectingThisToBeOptional = self.getOptional()
{
// attempting to use expectingThisToBeOptional! gives error saying type is String not String!
}
else
{
// why does execution come here when run?
}