https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69836

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |jason at gcc dot gnu.org
   Last reconfirmed|                            |2023-02-01

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > I wonder if this is just invalid code but no diagnostic required as state
> > changes inside the scope of TemplateObject.
> 
> That is it needs to be reinterpret it after the parsing and needs to same
> inside the scope itself. Like types of the same name should stay the same if
> used inside the class.

I have not considered that rule to apply to additional overloads.  Here, the
problem looks to be that we're re-calculating the type of w_counter inside the
function definition (where the current function is in the overload set) rather
than using the actual parameter type (which is calculated before the current
function is in the overload set).

Reply via email to