mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 07:28:26 +02:00
* explicitely store the procdef of the picked constructor of the attribute
git-svn-id: trunk@42400 -
This commit is contained in:
parent
dfb9fffcf9
commit
8ce4f9606d
@ -502,7 +502,7 @@ implementation
|
||||
to the property which is defined next. }
|
||||
if not assigned(rtti_attrs_def) then
|
||||
rtti_attrs_def:=trtti_attribute_list.create;
|
||||
rtti_attrs_def.addattribute(typesym,pcalln,paras);
|
||||
rtti_attrs_def.addattribute(typesym,tcallnode(pcalln).procdefinition,pcalln,paras);
|
||||
end
|
||||
else
|
||||
pcalln.free;
|
||||
|
@ -62,6 +62,7 @@ interface
|
||||
|
||||
trtti_attribute = class
|
||||
typesym : tsym;
|
||||
typeconstr : tdef;
|
||||
constructorcall : tnode;
|
||||
constructorpd : tdef;
|
||||
paras : array of tnode;
|
||||
@ -73,7 +74,7 @@ interface
|
||||
{ if the attribute list is bound to a def or symbol }
|
||||
is_bound : Boolean;
|
||||
class procedure bind(var dangling,owned:trtti_attribute_list);
|
||||
procedure addattribute(atypesym:tsym;constructorcall:tnode;constref paras:array of tnode);
|
||||
procedure addattribute(atypesym:tsym;typeconstr:tdef;constructorcall:tnode;constref paras:array of tnode);
|
||||
destructor destroy; override;
|
||||
function get_attribute_count:longint;
|
||||
end;
|
||||
@ -2937,7 +2938,7 @@ implementation
|
||||
dangling:=nil;
|
||||
end;
|
||||
|
||||
procedure trtti_attribute_list.addattribute(atypesym:tsym;constructorcall:tnode;constref paras:array of tnode);
|
||||
procedure trtti_attribute_list.addattribute(atypesym:tsym;typeconstr:tdef;constructorcall:tnode;constref paras:array of tnode);
|
||||
var
|
||||
newattribute : trtti_attribute;
|
||||
i : sizeint;
|
||||
@ -2946,6 +2947,7 @@ implementation
|
||||
rtti_attributes:=TFPObjectList.Create(true);
|
||||
newattribute:=trtti_attribute.Create;
|
||||
newattribute.typesym:=atypesym;
|
||||
newattribute.typeconstr:=typeconstr;
|
||||
newattribute.constructorcall:=constructorcall;
|
||||
setlength(newattribute.paras,length(paras));
|
||||
for i:=0 to high(paras) do
|
||||
|
Loading…
Reference in New Issue
Block a user