mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:06:14 +02:00
symdef.pas, tstoreddef:
* adjust "is_generic" so that it will really work for true generics only + added an analogous method "is_specialization" for specializations Both methods are not used yet, but this will change in the future... git-svn-id: trunk@23348 -
This commit is contained in:
parent
fdb1950227
commit
6fb958a491
@ -95,6 +95,8 @@ interface
|
||||
generic declaration or just a normal type declared inside another
|
||||
generic }
|
||||
function is_generic:boolean;inline;
|
||||
{ same as above for specializations }
|
||||
function is_specialization:boolean;inline;
|
||||
private
|
||||
savesize : asizeuint;
|
||||
end;
|
||||
@ -1638,9 +1640,16 @@ implementation
|
||||
generictokenbuf:=tdynamicarray.create(256);
|
||||
end;
|
||||
|
||||
|
||||
function tstoreddef.is_generic: boolean;
|
||||
begin
|
||||
result:=genericparas.count>0;
|
||||
result:=(genericparas.count>0) and (df_generic in defoptions);
|
||||
end;
|
||||
|
||||
|
||||
function tstoreddef.is_specialization: boolean;
|
||||
begin
|
||||
result:=(genericparas.count>0) and (df_specialization in defoptions);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user