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