* pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 29 Mar 1999 01:09:28 +0000 (01:09 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 29 Mar 1999 01:09:28 +0000 (20:09 -0500)
From-SVN: r26050

gcc/cp/ChangeLog
gcc/cp/pt.c

index 96970ed736ea65ba71d7074501242842cb8b7e4a..beee754bb3b84d76c37bc52fc65b2c63c99b9b00 100644 (file)
@@ -1,3 +1,7 @@
+1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
+
 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (add_friend): Declare.
index 8855efa311e4f30381d3745a77249c4c33787934..04ca1b3fc353ea729bbf4e64fed0e4011d83843e 100644 (file)
@@ -7317,10 +7317,11 @@ fn_type_unification (fn, explicit_targs, targs, args, return_type,
   if (DECL_CONV_FN_P (fn))
     {
       /* This is a template conversion operator.  Use the return types
-         as well as the argument types.  */
+         as well as the argument types.  We use it instead of 'this', since
+         we could be comparing conversions from different classes.  */
       parms = scratch_tree_cons (NULL_TREE, TREE_TYPE (fntype),
-                                parms);
-      args = scratch_tree_cons (NULL_TREE, return_type, args);
+                                TREE_CHAIN (parms));
+      args = scratch_tree_cons (NULL_TREE, return_type, TREE_CHAIN (args));
     }
 
   /* We allow incomplete unification without an error message here