mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-29 02:20:04 +02:00
[svn r77] Fixed foreach on slice.
Fixed some nested function problems when accessing outer function parameters. Major changes to handling of structs. Initial support for unions. Probably more...
This commit is contained in:
15
test/union1.d
Normal file
15
test/union1.d
Normal file
@@ -0,0 +1,15 @@
|
||||
module union1;
|
||||
|
||||
pragma(LLVM_internal, "notypeinfo")
|
||||
union U
|
||||
{
|
||||
float f;
|
||||
int i;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
float f = 2;
|
||||
U u = U(f);
|
||||
assert(u.i == *cast(int*)&f);
|
||||
}
|
||||
Reference in New Issue
Block a user