After changing a boolean to false in lldb, it's still evaluating to true. Here's a simplified version.
=> is a breakpoint
func getCount(actionWasSuccessful successful: Bool) -> Int {
=> var count = 0
// (lldb) po successful (returns true)
// (lldb) exp successful = false
// (lldb) po successful (returns false)
if successful {
=> count += 1 // breakpoint stops here
} else {
=> count = 0 // breakpoint should stop here
}
return count
}
let count = getCount(successful: true)
print(count) // returns 1