mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
compiler: check that records methods have implementation too. previously check worked only for some object types
git-svn-id: trunk@16609 -
This commit is contained in:
parent
92d6503704
commit
bf3c098c18
@ -183,6 +183,7 @@ interface
|
||||
constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile);
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
destructor destroy; override;
|
||||
procedure check_forwards; virtual;
|
||||
function find_procdef_bytype(pt:tproctypeoption): tprocdef;
|
||||
function GetSymtable(t:tGetSymtable):TSymtable;override;
|
||||
function is_packed:boolean;
|
||||
@ -305,7 +306,7 @@ interface
|
||||
function needs_inittable : boolean;override;
|
||||
function rtti_mangledname(rt:trttitype):string;override;
|
||||
function vmt_mangledname : string;
|
||||
procedure check_forwards;
|
||||
procedure check_forwards; override;
|
||||
procedure insertvmt;
|
||||
procedure set_parent(c : tobjectdef);
|
||||
function find_destructor: tprocdef;
|
||||
@ -2607,6 +2608,11 @@ implementation
|
||||
inherited destroy;
|
||||
end;
|
||||
|
||||
procedure tabstractrecorddef.check_forwards;
|
||||
begin
|
||||
tstoredsymtable(symtable).check_forwards;
|
||||
end;
|
||||
|
||||
function tabstractrecorddef.find_procdef_bytype(pt:tproctypeoption): tprocdef;
|
||||
var
|
||||
i: longint;
|
||||
@ -4485,7 +4491,7 @@ implementation
|
||||
procedure tobjectdef.check_forwards;
|
||||
begin
|
||||
if not(objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcprotocol]) then
|
||||
tstoredsymtable(symtable).check_forwards;
|
||||
inherited;
|
||||
if (oo_is_forward in objectoptions) then
|
||||
begin
|
||||
{ ok, in future, the forward can be resolved }
|
||||
|
@ -558,8 +558,8 @@ implementation
|
||||
if (tsym(sym).typ=typesym) and
|
||||
assigned(ttypesym(sym).typedef) and
|
||||
(ttypesym(sym).typedef.typesym=ttypesym(sym)) and
|
||||
(ttypesym(sym).typedef.typ=objectdef) then
|
||||
tobjectdef(ttypesym(sym).typedef).check_forwards;
|
||||
(ttypesym(sym).typedef.typ in [objectdef,recorddef]) then
|
||||
tabstractrecorddef(ttypesym(sym).typedef).check_forwards;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user