gcc/testsuite/gdc.dg/pr94970.d
raw| 1 | // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94970 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | struct S94970 |
| 5 | { |
| 6 | string index() { return null; } |
| 7 | ~this() { } |
| 8 | } |
| 9 | |
| 10 | static m() { return S94970(); } |
| 11 | |
| 12 | auto concat() |
| 13 | { |
| 14 | return m.index ~ ' '; |
| 15 | } |
| 16 | |
| 17 | auto newarray() |
| 18 | { |
| 19 | return new int[][](m.index.length, 1); |
| 20 | } |