1 /* 2 TEST_OUTPUT: 3 --- 4 fail_compilation/fail351.d(14): Error: cast(uint)this.num[index] is not an lvalue 5 --- 6 */ 7 8 // 2780 9 10 struct Immutable { 11 immutable uint[2] num; 12 opIndexImmutable13 ref uint opIndex(size_t index) immutable { 14 return num[index]; 15 } 16 } 17 main()18void main() { 19 immutable Immutable foo; 20 //foo[0]++; 21 } 22