https://issues.dlang.org/show_bug.cgi?id=18357
Andrei Alexandrescu <and...@erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |and...@erdani.com --- Comment #2 from Andrei Alexandrescu <and...@erdani.com> --- A similar example shows fetching a mutable pointer to immutable data: ---- int* g; struct S { int* x; this(this) { g = x; } } void main() { immutable int* x = new int(42); assert(*x == 42); /* passes */ auto s = immutable S(x); auto s2 = s; /* should be rejected */ } --