* fixed another case of endless recursion in

tabstractrecordsymtable.has_single_field(), due to always looking in the
    symlist of the original record rather than properly recursing into those
    of nested ones (mantis )

git-svn-id: trunk@32618 -
This commit is contained in:
Jonas Maebe 2015-12-08 15:35:19 +00:00
parent 01d93b61c3
commit 0b4f3f01b3
3 changed files with 31 additions and 3 deletions

1
.gitattributes vendored
View File

@ -14854,6 +14854,7 @@ tests/webtbs/tw2853e.pp svneol=native#text/plain
tests/webtbs/tw2859.pp svneol=native#text/plain
tests/webtbs/tw28593.pp svneol=native#text/plain
tests/webtbs/tw28632.pp -text svneol=native#text/plain
tests/webtbs/tw28641.pp svneol=native#text/plain
tests/webtbs/tw2865.pp svneol=native#text/plain
tests/webtbs/tw28650.pp svneol=native#text/pascal
tests/webtbs/tw28674.pp svneol=native#text/pascal

View File

@ -1469,8 +1469,8 @@ implementation
{ record has one field? }
for i:=0 to currentsymlist.Count-1 do
begin
if (tsym(symlist[i]).typ=fieldvarsym) and
not(sp_static in tsym(symlist[i]).symoptions) then
if (tsym(currentsymlist[i]).typ=fieldvarsym) and
not(sp_static in tsym(currentsymlist[i]).symoptions) then
begin
if result then
begin
@ -1478,7 +1478,7 @@ implementation
exit;
end;
result:=true;
sym:=tfieldvarsym(symlist[i])
sym:=tfieldvarsym(currentsymlist[i])
end;
end;
if assigned(sym) then

27
tests/webtbs/tw28641.pp Normal file
View File

@ -0,0 +1,27 @@
{ %norun }
{$mode delphi}
program Test;
type
TMD5DigestHelper = record
public type
TMD5Buffer = array[0..63] of Byte;
TMD5Context = record
Buffer: TMD5Buffer;
end;
private
function Func_F(const X, Y, Z: LongWord): LongWord;
public
Context: TMD5Context;
end;
function TMD5DigestHelper.Func_F(const X, Y, Z: LongWord): LongWord;
begin
Result := (X and Y) or ((not X) and Z);
end;
begin
end.