https://issues.dlang.org/show_bug.cgi?id=23987
--- Comment #3 from RazvanN <[email protected]> --- (In reply to RazvanN from comment #2) > > void main() > { > immutable(S) s1 = S(2); > immutable(S) s2 = s1; > writeln(*s2.p); > *s = 9; > writeln(*s2.p); > } `p` is not a pointer so no need for the `*`. Sorry for the bogus test case. Correct code: ``` int* s; struct S { int p; this(const ref S src) { s = &p; } } void main() { immutable(S) s1 = S(2); immutable(S) s2 = s1; writeln(s2.p); *s = 9; writeln(s2.p); } ``` --
