Vyacheslav Vyacheslav - 1 month ago 6
Swift Question

didSet leads to EXC_BAD_ACCESS

If I use this:

fileprivate var _saved = false
open var lat = 0.0 {
didSet {
_saved = false
}
}


leads to EXC_BAD_ACCESS

for

moobj.lat = 0.0


but simple
open var lat = 0.0
looks fine. no errors.
Why?

Answer

After few hours and several rebuilds/restart the problem dissapeared. Don't know the reason. Imo, bug of XCode.