* 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:
Jonas Maebe 2015-02-13 15:43:34 +00:00
parent 04534d5dcf
commit 071282b286
4 changed files with 28 additions and 1 deletions

2
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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
View File

@ -0,0 +1,12 @@
{$modeswitch objectivec2}
unit uobjc42;
interface
type
tinf = objcprotocol
procedure mytest; message 'mytest';
end;
implementation
end.