diff tests/mini/nocompile_initoverlap1.d @ 1254:747fdd9245d7

Added checks for overlapping union initializers, as shown in bug #259 .
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Wed, 22 Apr 2009 01:18:21 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/mini/nocompile_initoverlap1.d	Wed Apr 22 01:18:21 2009 +0200
@@ -0,0 +1,8 @@
+struct Vector {
+        union { float x; float y; }
+        const static Vector zero = { x : 0, y : 0 };
+}
+
+struct HBoxLayout {
+        Vector padding  = Vector.zero;
+}