Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / template / crash100.C
blobc67ae2eca38da234047010ad6a79ea1a9839aff3
1 // PR c++/44628
3 template <typename T>
4 class Temp
6   int Val;
7   public:
8   operator T&(void)  { return Val; }
10   virtual T& operator=(T a ) // { dg-error "overriding" }
11   {
12     Val = a;
13     return Val;
14   }
17 class Int : public Temp<int>
19   public:
20   Int& operator=(int a) // { dg-error "conflicting return type" }
21   {
22     return (*this);
23   }