Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/fail22134.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=22134
2 /* REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/fail22134.d(12): Deprecation: `this.arr[i]` has no effect
6 ---
7 */
8 struct StackBuffer
9 {
10 auto opIndex(size_t i)
11 {
12 return arr[i];
13 }
14
15 private:
16 void[] arr;
17 }