Comment #0 by john.loughran.colvin — 2016-01-26T08:25:20Z
void main()
{
immutable S s0;
S s1;
assert(s0.c.a == 42);
s1.c.a = -42;
assert(s0.c.a == 42); //FAILS!
}
struct S
{
C c = new C(42);
}
class C
{
int a;
this(int a)
{
this.a = a;
}
}
Comment #1 by nick — 2024-06-07T10:04:30Z
*** This issue has been marked as a duplicate of issue 10376 ***