mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 09:09:30 +02:00
* add methods of objcprotocols to the list of visible "helper" methods when
loading them from ppu (like was already done when they were initially compiler), so they can be called via the "id" type even if no classes are in scope that implement them git-svn-id: trunk@29686 -
This commit is contained in:
parent
04534d5dcf
commit
071282b286
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -11972,6 +11972,7 @@ tests/test/tobjc39.pp svneol=native#text/plain
|
||||
tests/test/tobjc4.pp svneol=native#text/plain
|
||||
tests/test/tobjc40.pp svneol=native#text/plain
|
||||
tests/test/tobjc41.pp svneol=native#text/plain
|
||||
tests/test/tobjc42.pp svneol=native#text/plain
|
||||
tests/test/tobjc4a.pp svneol=native#text/plain
|
||||
tests/test/tobjc5.pp svneol=native#text/plain
|
||||
tests/test/tobjc5a.pp svneol=native#text/plain
|
||||
@ -12655,6 +12656,7 @@ tests/test/uobjc35f.pp svneol=native#text/plain
|
||||
tests/test/uobjc35g.pp svneol=native#text/plain
|
||||
tests/test/uobjc39.pp svneol=native#text/plain
|
||||
tests/test/uobjc41.pp svneol=native#text/plain
|
||||
tests/test/uobjc42.pp svneol=native#text/plain
|
||||
tests/test/uobjc7.pp svneol=native#text/plain
|
||||
tests/test/uobjcl1.pp svneol=native#text/plain
|
||||
tests/test/uprec6.pp svneol=native#text/plain
|
||||
|
@ -6313,7 +6313,7 @@ implementation
|
||||
inherited derefimpl;
|
||||
{ the procdefs are not owned by the class helper procsyms, so they
|
||||
are not stored/restored either -> re-add them here }
|
||||
if (objecttype=odt_objcclass) or
|
||||
if (objecttype in [odt_objcclass,odt_objcprotocol]) or
|
||||
(oo_is_classhelper in objectoptions) then
|
||||
symtable.DefList.ForEachCall(@create_class_helper_for_procdef,nil);
|
||||
end;
|
||||
|
13
tests/test/tobjc42.pp
Normal file
13
tests/test/tobjc42.pp
Normal file
@ -0,0 +1,13 @@
|
||||
{ %target=darwin }
|
||||
{ %recompile }
|
||||
{ %norun }
|
||||
|
||||
{$modeswitch objectivec2}
|
||||
|
||||
uses uobjc42;
|
||||
|
||||
var
|
||||
i: id;
|
||||
begin
|
||||
i.mytest;
|
||||
end.
|
12
tests/test/uobjc42.pp
Normal file
12
tests/test/uobjc42.pp
Normal file
@ -0,0 +1,12 @@
|
||||
{$modeswitch objectivec2}
|
||||
unit uobjc42;
|
||||
|
||||
interface
|
||||
type
|
||||
tinf = objcprotocol
|
||||
procedure mytest; message 'mytest';
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user