Closed iccir closed 6 years ago
Consider the following code:
@class A @property B b; - (void) printB { console.log(_b); } @end @class A1 : A @property B1 b; @end @class B @end @class B1 : B @end
Currently, oj's auto property synthesis will create both $oj_i_A$_b and $oj_i_A1$_b1 backing ivars. This breaks -printB for A1 instances.
$oj_i_A$_b
$oj_i_A1$_b1
-printB
A1
To mirror Obj-C, auto property synthesis shouldn't happen for A1.b, and a warning should be issued:
A1.b
Auto property synthesis will not synthesize property 'b'; it will be implemented by its superclass, use @dynamic to acknowledge intention
No longer applicable in 3.0 due to #153
Consider the following code:
Currently, oj's auto property synthesis will create both
$oj_i_A$_b
and$oj_i_A1$_b1
backing ivars. This breaks-printB
forA1
instances.To mirror Obj-C, auto property synthesis shouldn't happen for
A1.b
, and a warning should be issued:Auto property synthesis will not synthesize property 'b'; it will be implemented by its superclass, use @dynamic to acknowledge intention