From 9412d4abd22b10936fb2a230ca62f693f53fa38d Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 6 Jun 2012 18:46:01 +0000 Subject: [PATCH] * add a reference to the procsym corresponding to the chosen overloaded procdef, so that the unit containing it is marked as "used" (mantis #15966) Even better would be if the unit containing the originally found procsym were not also marked as used, but that would require a significant rewrite (all symbols found using symboltable helpers are automatically marked by those routines) git-svn-id: trunk@21501 - --- .gitattributes | 2 ++ compiler/ncal.pas | 5 +++++ tests/webtbs/tw15966.pp | 15 +++++++++++++++ tests/webtbs/uw15966.pp | 15 +++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 tests/webtbs/tw15966.pp create mode 100644 tests/webtbs/uw15966.pp diff --git a/.gitattributes b/.gitattributes index ffbac75ece..2d9dc43ca7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12305,6 +12305,7 @@ tests/webtbs/tw15843.pp svneol=native#text/plain tests/webtbs/tw15909.pp svneol=native#text/plain tests/webtbs/tw1592.pp svneol=native#text/plain tests/webtbs/tw15930.pp svneol=native#text/plain +tests/webtbs/tw15966.pp svneol=native#text/plain tests/webtbs/tw16004.pp svneol=native#text/plain tests/webtbs/tw16018.pp svneol=native#text/plain tests/webtbs/tw16034.pp svneol=native#text/plain @@ -13408,6 +13409,7 @@ tests/webtbs/uw14124.pp svneol=native#text/plain tests/webtbs/uw14958.pp svneol=native#text/plain tests/webtbs/uw15591.pp svneol=native#text/pascal tests/webtbs/uw15909.pp svneol=native#text/plain +tests/webtbs/uw15966.pp svneol=native#text/plain tests/webtbs/uw17220.pp svneol=native#text/plain tests/webtbs/uw17220a.pp svneol=native#text/plain tests/webtbs/uw17493.pp svneol=native#text/plain diff --git a/compiler/ncal.pas b/compiler/ncal.pas index 880d4e40c3..2421f1fb1b 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -2967,6 +2967,11 @@ implementation if (procdefinition.typ = procdef) then check_hints(tprocdef(procdefinition).procsym,tprocdef(procdefinition).symoptions,tprocdef(procdefinition).deprecatedmsg); + { add reference to corresponding procsym; may not be the one + originally found/passed to the constructor because of overloads } + if procdefinition.typ = procdef then + addsymref(tprocdef(procdefinition).procsym); + { add needed default parameters } if assigned(procdefinition) and (paralength