From 82b2944eb88cbd530c300159a28b18b80579764a Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 6 Nov 2022 20:54:53 -0600 Subject: [PATCH] Give an error if a function is defined multiple times. --- Parser.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Parser.pas b/Parser.pas index fd7750c..5168b4d 100644 --- a/Parser.pas +++ b/Parser.pas @@ -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;