mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
19 lines
308 B
D
19 lines
308 B
D
/*
|
|
REQUIRED_ARGS: -preview=fixImmutableConv
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/union_conv.d(18): Error: cannot implicitly convert expression `c` of type `const(U)` to `U` because union `U` contains pointers or references
|
|
---
|
|
*/
|
|
|
|
union U
|
|
{
|
|
int i;
|
|
int* p;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
const U c;
|
|
U m = c;
|
|
}
|