[Issue 19098] New: Improve error for non-assignable struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 19 11:25:26 UTC 2018
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 at puremagic.com
Reporter: razvan.nitu1305 at 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
--
More information about the Digitalmars-d-bugs
mailing list