* don't try to write rtti for fields in Pascal records/classes/objects/...

whose type is an objc type (objcclass, objcprotocol): they only need
    objc-style rtti, which is generated elsewhere (and to prevent bugs
    they give an internal error if we try to generate FPC-style rtti for
    them) (mantis #20876)

git-svn-id: trunk@19861 -
This commit is contained in:
Jonas Maebe 2011-12-17 11:43:13 +00:00
parent 2d2436c256
commit 22dd93858d
3 changed files with 23 additions and 1 deletions

1
.gitattributes vendored
View File

@ -9734,6 +9734,7 @@ tests/test/packages/cocoaint/tobjc33a.pp svneol=native#text/plain
tests/test/packages/cocoaint/tobjcnh1.pp svneol=native#text/plain
tests/test/packages/cocoaint/tvarpara.pp svneol=native#text/plain
tests/test/packages/cocoaint/tw16329.pp svneol=native#text/plain
tests/test/packages/cocoaint/tw20876.pp svneol=native#text/plain
tests/test/packages/fcl-base/tascii85.pp svneol=native#text/plain
tests/test/packages/fcl-base/tgettext1.pp svneol=native#text/plain
tests/test/packages/fcl-db/assertions.pas svneol=native#text/plain

View File

@ -171,7 +171,8 @@ implementation
(
(rt=fullrtti) or
tfieldvarsym(sym).vardef.needs_inittable
) then
) and
not is_objc_class_or_protocol(tfieldvarsym(sym).vardef) then
begin
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_sym(ref_rtti(tfieldvarsym(sym).vardef,rt)));
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_32bit(tfieldvarsym(sym).fieldoffset));

View File

@ -0,0 +1,20 @@
{ %norun }
unit tw20876;
{$mode delphi}
{$modeswitch objectivec1}
interface
uses
CocoaAll;
type
arecord = record
astr: NSString;
end;
implementation
end.