☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail19098.d
☽
☼
gcc/testsuite/gdc.test/fail_compilation/fail19098.d
code
plain
raw
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail19098.d(18): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members
5
---
6
*/
7
8
struct A
9
{
10
const int a;
11
this(int) {}
12
}
13
14
void main()
15
{
16
A a = A(2);
17
A b = A(3);
18
a = b;
19
}