mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-27 14:19:02 +01:00
Added checks for overlapping union initializers, as shown in bug #259 .
This commit is contained in:
8
tests/mini/nocompile_initoverlap1.d
Normal file
8
tests/mini/nocompile_initoverlap1.d
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user