February 03, 2005
<code>
void main(){
  struct Entry{
    int variable;
  }
  Entry[10] table;

  with( table[ 1]) variable=0;

  class Class{
    struct Entry{
      int variable;
    }
    Entry[10] table;
    Entry opIndex( int inx){
      return table[ inx];
    }
  }
  Class c= new Class;

  with( c[ 1]) variable= 0;
}
</code>

Should not throw "c.opIndex(1) is not an lvalue".

-manfred
February 12, 2005
Manfred Nowak wrote:
| <code>
| void main(){
|   struct Entry{
|     int variable;
|   }
|   Entry[10] table;
|
|   with( table[ 1]) variable=0;
|
|   class Class{
|     struct Entry{
|       int variable;
|     }
|     Entry[10] table;
|     Entry opIndex( int inx){
|       return table[ inx];
|     }
|   }
|   Class c= new Class;
|
|   with( c[ 1]) variable= 0;
| }
| </code>
|
| Should not throw "c.opIndex(1) is not an lvalue".

Added to DStress as
http://dstress.kuehne.cn/run/with_12.d
http://dstress.kuehne.cn/run/with_13.d

Thomas