Swift / Playground - Assertions not working in Xcode 6.3.2?

445 views Asked by At

The following code statement is not interpreted by the playground, resulting to display the initial constant values, but the assertion is never triggered.

Am i missing something in my code, or is this a bug?

let aPersonsAge = -10
assert(aPersonsAge >= 0, "This is logically impossible.") // not thrown

var myString: String? = "hey there, stack overflow!"
myString = nil
assert(myString != nil, "This cannot be nil.") // not thrown
0

There are 0 answers