☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail18236.d
☽
☼
gcc/testsuite/gdc.test/fail_compilation/fail18236.d
code
plain
raw
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail18236.d(20): Error: cannot cast expression `V(12)` of type `V` to `int`
5
---
6
*/
7
8
struct V
9
{
10
int a;
11
}
12
13
struct S
14
{
15
enum A = V(12);
16
}
17
18
void main()
19
{
20
int b = cast(int)S.A;
21
}