Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // LDC - the LLVM D compiler (0.16.0-beta2):
- // based on DMD v2.067.1 and LLVM 3.7.0
- // Default target: x86_64-pc-windows-msvc
- //
- // ldc2 main.d -w -g -unittest -m64 -oq
- void main(string[] args)
- {
- }
- struct Foo
- {
- union
- {
- struct
- {
- ubyte data1 = void;
- ubyte data2 = void;
- }
- ushort data3 = 0x100;
- }
- }
- unittest
- {
- Foo foo;
- import std.stdio;
- writeln(foo.data3);
- assert(foo.data3 == 0x100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement