Fix the fix for Mantis #21538. The check never really worked up to now...

defcmp.pas, compare_defs_ext:
  use "equal_defs" instead of a reference comparison to check whether the type defs are equal
pgenutil.pas, insert_generic_parameter_types:
  * add to each (specialized) generic parameter the "sp_generic_para" flag so that it will be added to the "genericparas" list upon ppu loading
  * add the generic parameter to the genericparas list as well, so that the comparison in "compare_defs_ext" is triggered at all... (up to now the list was always empty -.-)
ppu.pas:
  * increase PPU version

git-svn-id: trunk@23149 -
This commit is contained in:
svenbarth 2012-12-15 21:43:52 +00:00
parent 43371002c4
commit 9ef4a35a7b
3 changed files with 9 additions and 2 deletions

View File

@ -206,6 +206,7 @@ implementation
hpd : tprocdef;
i : longint;
diff : boolean;
symfrom,symto : tsym;
begin
eq:=te_incompatible;
doconv:=tc_not_possible;
@ -277,7 +278,11 @@ implementation
begin
if tstoreddef(def_from).genericparas.nameofindex(i)<>tstoreddef(def_to).genericparas.nameofindex(i) then
internalerror(2012091302);
if tstoreddef(def_from).genericparas[i]<>tstoreddef(def_to).genericparas[i] then
symfrom:=ttypesym(tstoreddef(def_from).genericparas[i]);
symto:=ttypesym(tstoreddef(def_to).genericparas[i]);
if not (symfrom.typ=typesym) or not (symto.typ=typesym) then
internalerror(2012121401);
if not equal_defs(ttypesym(symfrom).typedef,ttypesym(symto).typedef) then
diff:=true;
if diff then
break;

View File

@ -662,6 +662,8 @@ uses
else
include(def.defoptions,df_specialization);
st.insert(generictype);
include(generictype.symoptions,sp_generic_para);
def.genericparas.add(generictype.name,generictype);
end;
end;

View File

@ -43,7 +43,7 @@ type
{$endif Test_Double_checksum}
const
CurrentPPUVersion = 155;
CurrentPPUVersion = 156;
{ buffer sizes }
maxentrysize = 1024;