https://issues.dlang.org/show_bug.cgi?id=19098
Issue ID: 19098 Summary: Improve error for non-assignable struct Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: trivial Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: razvan.nitu1...@gmail.com struct A { const int a; this(int) {} } void main() { A a = A(2); A b = A(3); a = b; } Error: cannot modify struct a A with immutable members A does not contain any immutable members. Error message should be: cannot modify struct instance a of type A because it contains non-mutable members --