The following code compiles ok in one function:
but the following code which is virtually the same fails the initialise with the error "Constant 'stop' being used before being initialised" :
Any suggestions - looks like a compiler issue to me.
Code Block let stop:UnsafeMutablePointer<ObjCBool> stop.initialize(to: false) text.enumerateAttribute(kStyleKey, in: NSRange(location: 0, length: text.string.count), options: []) { (value, range, stop) in
but the following code which is virtually the same fails the initialise with the error "Constant 'stop' being used before being initialised" :
Code Block let stop:UnsafeMutablePointer<ObjCBool> stop.initialize(to: false) attributedText.enumerateAttribute(kStyleKey, in: NSRange(location: selectedRange.location, length: selectedRange.length), options: []) { (value, range, stop) in
Any suggestions - looks like a compiler issue to me.