jamireh
01/24/2016, 7:45 PMif(someTrueCondition)
return “blah”
return “hello world”
would still return hello world
?
I usually fix it by changing the syntax to
var foo:String? = null
if(someTrueCondition)
foo = “blah”
else
foo = “hello world”
return foo
It’s definitely not a consistent “bug" so I’m not quite sure why it only sometimes happens but it’s almost as if the else
block is required.