July 19, 2018 [Issue 19098] New: Improve error for non-assignable struct | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com Reporter: razvan.nitu1305@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 -- |
Copyright © 1999-2021 by the D Language Foundation