☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
union_conv.d
☽
☼
gcc/testsuite/gdc.test/fail_compilation/union_conv.d
code
plain
raw
1
/*
2
REQUIRED_ARGS: -preview=fixImmutableConv
3
TEST_OUTPUT:
4
---
5
fail_compilation/union_conv.d(18): Error: cannot implicitly convert expression `c` of type `const(U)` to `U`
6
---
7
*/
8
9
union U
10
{
11
int i;
12
int* p;
13
}
14
15
void main()
16
{
17
const U c;
18
U m = c;
19
}