mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-19 19:39:36 +01:00
* 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:
parent
2d2436c256
commit
22dd93858d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
||||
@ -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));
|
||||
|
||||
20
tests/test/packages/cocoaint/tw20876.pp
Normal file
20
tests/test/packages/cocoaint/tw20876.pp
Normal file
@ -0,0 +1,20 @@
|
||||
{ %norun }
|
||||
|
||||
unit tw20876;
|
||||
|
||||
{$mode delphi}
|
||||
{$modeswitch objectivec1}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
CocoaAll;
|
||||
|
||||
type
|
||||
arecord = record
|
||||
astr: NSString;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user