summaryrefslogtreecommitdiff
path: root/libphobos/testsuite/libphobos.betterc/test20088.d
diff options
context:
space:
mode:
Diffstat (limited to 'libphobos/testsuite/libphobos.betterc/test20088.d')
-rw-r--r--libphobos/testsuite/libphobos.betterc/test20088.d14
1 files changed, 14 insertions, 0 deletions
diff --git a/libphobos/testsuite/libphobos.betterc/test20088.d b/libphobos/testsuite/libphobos.betterc/test20088.d
new file mode 100644
index 00000000000..a809041c877
--- /dev/null
+++ b/libphobos/testsuite/libphobos.betterc/test20088.d
@@ -0,0 +1,14 @@
+/*******************************************/
+// https://issues.dlang.org/show_bug.cgi?id=20088
+
+struct S {
+ int i;
+}
+
+extern(C) int main() @nogc nothrow pure
+{
+ S[2] s = [S(1),S(2)];
+ void[] v = cast(void[])s;
+ S[] p = cast(S[])v; // cast of void[] to S[] triggers __ArrayCast template function
+ return 0;
+}