When overriding the didSet observer of a property results in recursion, why?
class TwiceInt {
var value:Int = 0 {
didSet {
value *= 2
it appears for some reason, despite the override it is still calling the superClass didSet.
In the first example you end up in recursion because setting quad sets off the superclass didSet which in turn sets off the quads did set etc ect.
In the second example setting the value causes both didSets to occur once each, then the quad didSet also sets of the super didSet on last time.
quad.value = 5
value =*2(superclass didSet) *4(subClass didSet) *2(superClass didSet) =80