From 2e4d8e36a5aa7ab44fcaece2fa3308309a705fb2 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Fri, 5 Jul 2019 14:12:16 +0000 Subject: [PATCH] * fix for Mantis #35670: when a unused dummy symbol is found for a non-generic procedure/function, hide that dummy symbol and create a new symbol for the procedure/function + added tests git-svn-id: trunk@42329 - --- compiler/pdecsub.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compiler/pdecsub.pas b/compiler/pdecsub.pas index d600583fef..26b19627c2 100644 --- a/compiler/pdecsub.pas +++ b/compiler/pdecsub.pas @@ -1050,6 +1050,16 @@ implementation HideSym(srsym); searchagain:=true; end + else if (srsym.typ=typesym) and + (sp_generic_dummy in srsym.symoptions) and + (ttypesym(srsym).typedef.typ=undefineddef) then + begin + { this is a generic dummy symbol that has not yet + been used; so we rename the dummy symbol and continue + as if nothing happened } + hidesym(srsym); + searchagain:=true; + end else begin { we use a different error message for tp7 so it looks more compatible }