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
let foo = [[Foo alloc] init];
[foo bar];
[foo baz];
oj generates:
var $oj_t_0;let foo = (($oj_t_0 = (new $oj_oj._cls.$oj_c_Foo())) && $oj_t_0.init());
(foo && foo.$oj_f_bar());
(foo && foo.$oj_f_baz());
It should be possible to write a Babel transformer to remove the unneeded foo && … check:
var $oj_t_0;let foo = (($oj_t_0 = (new $oj_oj._cls.$oj_c_Foo())) && $oj_t_0.init());
(foo && (
foo.$oj_f_bar(),
foo.$oj_f_baz()
));
Care must be given that foo isn't closed over and modified by foo.$oj_f_bar or foo.$oj_f_baz. (This should never be the case for oj methods, but may be the case for other JavaScript).
The text was updated successfully, but these errors were encountered:
From the following code:
oj generates:
It should be possible to write a Babel transformer to remove the unneeded
foo && …
check:Care must be given that
foo
isn't closed over and modified byfoo.$oj_f_bar
orfoo.$oj_f_baz
. (This should never be the case for oj methods, but may be the case for other JavaScript).The text was updated successfully, but these errors were encountered: