Bug 21885 – Bad diagnostic: struct is not copyable because it is annotated @disable
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-05-01T12:49:03Z
Last change time
2021-05-23T03:29:54Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Tobias Pankrath
Comments
Comment #0 by tobias — 2021-05-01T12:49:03Z
--
struct Outer
{
Inner i;
}
struct Inner
{
@disable this(this);
}
void main()
{
Outer o1;
Outer o2;
o1 = o2;
}
--
Error message: Error: struct `tests.at_disable.Outer` is not copyable because it is annotated with `@disable`
Should instead say: because Outer.i is not copyable or smth. similar.
Comment #1 by dlang-bot — 2021-05-11T08:50:08Z
@RazvanN7 created dlang/dmd pull request #12513 "Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable" fixing this issue:
- Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable
https://github.com/dlang/dmd/pull/12513
Comment #2 by dlang-bot — 2021-05-23T03:29:54Z
dlang/dmd pull request #12513 "Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable" was merged into master:
- 38cce70aeb28a6f70ce75d6bbaecc02922617e5a by RazvanN7:
Fix Issue 21885 - Bad diagnostic: struct is not copyable because it is annotated @disable
https://github.com/dlang/dmd/pull/12513