The following code fails to compile with DMD 2.082.0:
void main()
{
scope a = new const Object; // Error: cannot modify `const` expression `a`
scope b = new immutable Object; // Error: cannot modify `immutable` expression `b`
}
Comment #1 by pro.mathias.lang — 2020-07-06T03:36:38Z
*** Issue 20169 has been marked as a duplicate of this issue. ***
Comment #2 by nick — 2022-05-30T13:38:43Z
*** Issue 21692 has been marked as a duplicate of this issue. ***
Comment #3 by robert.schadek — 2024-12-13T19:00:43Z