From 4bf7dfcceab7c70afc38e5c38e2b486960a841f8 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 1 Jan 2006 20:23:03 +0000 Subject: [PATCH] Merged revisions 2108 via svnmerge from svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk r2108 (jonas) * fixed web bug #4651 + test git-svn-id: branches/fixes_2_0@2109 - --- .gitattributes | 1 + compiler/ncal.pas | 4 +++- tests/webtbf/tw4651.pp | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/webtbf/tw4651.pp diff --git a/.gitattributes b/.gitattributes index 7dc41624a3..43820ac946 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5631,6 +5631,7 @@ tests/webtbf/tw4256.pp svneol=native#text/plain tests/webtbf/tw4359.pp svneol=native#text/plain tests/webtbf/tw4445.pp svneol=native#text/plain tests/webtbf/tw4529.pp svneol=native#text/plain +tests/webtbf/tw4651.pp svneol=native#text/plain tests/webtbf/uw0744.pp svneol=native#text/plain tests/webtbf/uw0840a.pp svneol=native#text/plain tests/webtbf/uw0840b.pp svneol=native#text/plain diff --git a/compiler/ncal.pas b/compiler/ncal.pas index b4d8b1f9ad..721ee2cbdb 100644 --- a/compiler/ncal.pas +++ b/compiler/ncal.pas @@ -1693,7 +1693,9 @@ type not(cnf_inherited in callnodeflags) and ((m_tp_procvar in aktmodeswitches) or (m_mac_procvar in aktmodeswitches)) and - (symtableprocentry.procdef_count=1) then + (symtableprocentry.procdef_count=1) and + (not assigned(methodpointer) or + (methodpointer.nodetype <> typen)) then begin hpt:=cloadnode.create(tprocsym(symtableprocentry),symtableproc); if assigned(methodpointer) then diff --git a/tests/webtbf/tw4651.pp b/tests/webtbf/tw4651.pp new file mode 100644 index 0000000000..2f8e50b479 --- /dev/null +++ b/tests/webtbf/tw4651.pp @@ -0,0 +1,23 @@ +{ %fail } + +{$mode delphi} +program test; + +type + TFoo = class(TObject) + constructor Create(Foo: Pointer); + end; + +constructor TFoo.Create(Foo: Pointer); +begin +end; + +procedure shiny; +var + p: pointer; + M: TFoo.Create; +begin +end; + +end. +