* class.c (add_method): Correct handling of conversion operators.

From-SVN: r55420
This commit is contained in:
Mark Mitchell 2002-07-12 07:56:49 +00:00 committed by Mark Mitchell
parent 8084c639fc
commit 4209417a70
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-07-12 Mark Mitchell <mark@codesourcery.com>
* class.c (add_method): Correct handling of conversion operators.
2002-07-11 Mark Mitchell <mark@codesourcery.com>
PR c++/7224

View File

@ -1006,7 +1006,10 @@ add_method (type, method, error_p)
if (! DECL_STATIC_FUNCTION_P (method))
parms2 = TREE_CHAIN (parms2);
if (same && compparms (parms1, parms2))
if (same && compparms (parms1, parms2)
&& (!DECL_CONV_FN_P (fn)
|| same_type_p (TREE_TYPE (TREE_TYPE (fn)),
TREE_TYPE (TREE_TYPE (method)))))
{
if (using && DECL_CONTEXT (fn) == type)
/* Defer to the local function. */