blob: c4f879f342d0324166c74b40ec812d22a9f6c686 [file] [log] [blame]
/*
TEST_OUTPUT:
---
fail_compilation/fail19098.d(18): Error: cannot modify struct instance `a` of type `A` because it contains `const` or `immutable` members
---
*/
struct A
{
const int a;
this(int) {}
}
void main()
{
A a = A(2);
A b = A(3);
a = b;
}