(root)/
gcc-13.2.0/
gcc/
testsuite/
gdc.test/
fail_compilation/
fail18236.d
/*
TEST_OUTPUT:
---
fail_compilation/fail18236.d(20): Error: cannot cast expression `V(12)` of type `V` to `int`
---
*/

struct V
{
    int a;
}

struct S
{
    enum A = V(12);
}

void main()
{
    int b = cast(int)S.A;
}