libphobos/testsuite/libphobos.betterc/test20088.d
raw| 1 | /*******************************************/ |
| 2 | // https://issues.dlang.org/show_bug.cgi?id=20088 |
| 3 | |
| 4 | struct S { |
| 5 | int i; |
| 6 | } |
| 7 | |
| 8 | extern(C) int main() @nogc nothrow pure |
| 9 | { |
| 10 | S[2] s = [S(1),S(2)]; |
| 11 | void[] v = cast(void[])s; |
| 12 | S[] p = cast(S[])v; // cast of void[] to S[] triggers __ArrayCast template function |
| 13 | return 0; |
| 14 | } |