You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are three levels of inheritance, C1, C2, and C3, and a method defined in C1 is overridden in C2, but not in C3, then in a C3 object's clone, inside the method, the super object will refer to the wrong level -- it will refer to the C2 methods instead of C1.
In the example below, in the clone, the addx method from C2 gets called twice, when it should only get called once.
If there are three levels of inheritance,
C1
,C2
, andC3
, and a method defined inC1
is overridden inC2
, but not inC3
, then in aC3
object's clone, inside the method, thesuper
object will refer to the wrong level -- it will refer to theC2
methods instead ofC1
.In the example below, in the clone, the
addx
method fromC2
gets called twice, when it should only get called once.The text was updated successfully, but these errors were encountered: