blob: a85948caf9aba66b765693c745b59b0048baf137 [file] [log] [blame]
// PR c++/44628
template <typename T>
class Temp
{
int Val;
public:
operator T&(void) { return Val; }
virtual T& operator=(T a ) // { dg-message "overridden" }
{
Val = a;
return Val;
}
};
class Int : public Temp<int>
{
public:
Int& operator=(int a) // { dg-error "conflicting return type" }
{
return (*this);
}
};