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:
svenbarth 2013-01-09 09:34:20 +00:00
parent fdb1950227
commit 6fb958a491

View File

@ -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;