mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 13:29:19 +02:00
* fixed calling inherited class methods from category methods when using
the iPhoneOS/Mac OS X 10.6 objc runtime interface (tests/test/tobjc25.pp) git-svn-id: trunk@14289 -
This commit is contained in:
parent
a823e6834d
commit
a6716fd2a2
@ -145,8 +145,16 @@ end;
|
|||||||
if (oo_is_classhelper in tobjectdef(tclassrefdef(def).pointeddef).objectoptions) then
|
if (oo_is_classhelper in tobjectdef(tclassrefdef(def).pointeddef).objectoptions) then
|
||||||
begin
|
begin
|
||||||
{ in case we are in a category method, we need the metaclass of the
|
{ in case we are in a category method, we need the metaclass of the
|
||||||
superclass class extended by this category (= metaclass of superclass of superclass) }
|
superclass class extended by this category (= metaclass of superclass of superclass)
|
||||||
result:=cloadvmtaddrnode.create(ctypenode.create(tobjectdef(tclassrefdef(def).pointeddef).childof.childof));
|
for the fragile abi, and the metaclass of the superclass for the non-fragile ABI }
|
||||||
|
{$if defined(onlymacosx10_6) or defined(arm) }
|
||||||
|
{ NOTE: those send2 methods are only available on Mac OS X 10.6 and later!
|
||||||
|
(but also on all iPhone SDK revisions we support) }
|
||||||
|
if (target_info.system in system_objc_nfabi) then
|
||||||
|
result:=cloadvmtaddrnode.create(ctypenode.create(tobjectdef(tclassrefdef(def).pointeddef).childof))
|
||||||
|
else
|
||||||
|
{$endif onlymacosx10_6 or arm}
|
||||||
|
result:=cloadvmtaddrnode.create(ctypenode.create(tobjectdef(tclassrefdef(def).pointeddef).childof.childof));
|
||||||
result:=objcloadbasefield(result,'ISA');
|
result:=objcloadbasefield(result,'ISA');
|
||||||
typecheckpass(result);
|
typecheckpass(result);
|
||||||
{ we're done }
|
{ we're done }
|
||||||
|
Loading…
Reference in New Issue
Block a user