2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / typeck4.C
blob21e2d96b4b9368ed714372d3149f30c1697f7619
1 // { dg-do assemble  }
2 // GROUPS passed typeck
3 class A {
4   public:
5     const int &operator[]( int i );
6   private:
7     int k;
8 };
10 const int& A::operator[]( int i )
12     return k;
16 void ff( A &anA )
18     int &ani = anA[0];// { dg-error "" } 
20     ani = 7;