Give an error if a function is defined multiple times.

This commit is contained in:
Stephen Heumann 2022-11-06 20:54:53 -06:00
parent 83147655d2
commit 82b2944eb8
1 changed files with 2 additions and 0 deletions

View File

@ -3861,6 +3861,8 @@ if isFunction then begin
else begin
if not first then
Error(22);
if variable^.state = defined then
Error(42);
ftype := fnType^.ftype; {record the type of the function}
while fType^.kind = definedType do
fType := fType^.dType;