mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
22 lines
397 B
D
22 lines
397 B
D
/*
|
|
REQUIRED_ARGS: -de
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/systemvariables_bool_union.d(21): Deprecation: accessing overlapped field `Box.b` with unsafe bit patterns will become `@system` in a future release
|
|
---
|
|
*/
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=24477
|
|
|
|
bool schrodingersCat() @safe
|
|
{
|
|
union Box
|
|
{
|
|
bool b;
|
|
ubyte y;
|
|
}
|
|
|
|
Box u;
|
|
u.y = 2;
|
|
return u.b;
|
|
}
|