* fix crash with duplicate id

This commit is contained in:
peter 2003-03-17 18:56:02 +00:00
parent fe6518a49c
commit d42645ca0a
2 changed files with 17 additions and 5 deletions

View File

@ -251,7 +251,10 @@ implementation
repeat repeat
vs:=tvarsym.create(orgpattern,generrortype); vs:=tvarsym.create(orgpattern,generrortype);
currparast.insert(vs); currparast.insert(vs);
sc.insert(vs); if assigned(vs.owner) then
sc.insert(vs)
else
vs.free;
consume(_ID); consume(_ID);
until not try_to_consume(_COMMA); until not try_to_consume(_COMMA);
{ read type declaration, force reading for value and const paras } { read type declaration, force reading for value and const paras }
@ -2117,7 +2120,10 @@ const
end. end.
{ {
$Log$ $Log$
Revision 1.106 2003-03-17 15:54:22 peter Revision 1.107 2003-03-17 18:56:02 peter
* fix crash with duplicate id
Revision 1.106 2003/03/17 15:54:22 peter
* store symoptions also for procdef * store symoptions also for procdef
* check symoptions (private,public) when calculating possible * check symoptions (private,public) when calculating possible
overload candidates overload candidates

View File

@ -153,7 +153,10 @@ implementation
repeat repeat
vs:=tvarsym.create(orgpattern,generrortype); vs:=tvarsym.create(orgpattern,generrortype);
symtablestack.insert(vs); symtablestack.insert(vs);
sc.insert(vs); if assigned(vs.owner) then
sc.insert(vs)
else
vs.free;
consume(_ID); consume(_ID);
until not try_to_consume(_COMMA); until not try_to_consume(_COMMA);
consume(_COLON); consume(_COLON);
@ -609,7 +612,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.44 2003-01-02 11:14:02 michael Revision 1.45 2003-03-17 18:56:02 peter
* fix crash with duplicate id
Revision 1.44 2003/01/02 11:14:02 michael
+ Patch from peter to support initial values for local variables + Patch from peter to support initial values for local variables
Revision 1.43 2002/12/27 15:22:20 peter Revision 1.43 2002/12/27 15:22:20 peter