mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 03:19:29 +02:00
Fix for Mantis #26456.
symtable.pas, searchsym_in_helper: * check whether extendeddef is assigned as this function is called when parsing the extended type and it was not found (the second pass is to display a more accurate error message and was added some weeks ago) + added test git-svn-id: trunk@28242 -
This commit is contained in:
parent
2fdb701f9a
commit
f1bfb398e4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12774,6 +12774,7 @@ tests/webtbf/tw26176.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw26193.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw26363.pp svneol=native#text/plain
|
||||
tests/webtbf/tw26363a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw26456.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw2650.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2657.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2670.pp svneol=native#text/plain
|
||||
|
@ -2926,7 +2926,9 @@ implementation
|
||||
end;
|
||||
end;
|
||||
{ now search in the extended type itself }
|
||||
if classh.extendeddef.typ in [recorddef,objectdef] then
|
||||
{ Note: the extendeddef might be Nil if we are currently parsing the
|
||||
extended type itself and the identifier was not found }
|
||||
if assigned(classh.extendeddef) and (classh.extendeddef.typ in [recorddef,objectdef]) then
|
||||
begin
|
||||
srsymtable:=tabstractrecorddef(classh.extendeddef).symtable;
|
||||
srsym:=tsym(srsymtable.FindWithHash(hashedid));
|
||||
|
16
tests/webtbf/tw26456.pp
Normal file
16
tests/webtbf/tw26456.pp
Normal file
@ -0,0 +1,16 @@
|
||||
{ %FAIL }
|
||||
|
||||
program tw26456;
|
||||
{$modeswitch advancedrecords}
|
||||
type
|
||||
THelper = record helper for xxxxxxx
|
||||
procedure test;
|
||||
end;
|
||||
|
||||
procedure THelper.test;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user