* Do not try to export symbol if an error occurred, avoid internal error. Fixes issue #40858

This commit is contained in:
Michaël Van Canneyt 2024-07-20 17:51:34 +02:00
parent 0a9169eb67
commit 258ad62c4d

View File

@ -197,6 +197,8 @@ implementation
if (DefString<>'') and UseDeffileForExports then
DefFile.AddExport(DefString);
end;
// consumed the symbol. Only do something if there was no error.
if ErrorCount=0 then
case srsym.typ of
procsym:
begin
@ -258,7 +260,7 @@ implementation
end;
else
internalerror(2019050502);
end
end; // Case srsym.typ
end
else
consume(_ID);