Bug 11505 – Bad error message: "opAssign [...] is annotated with @disable"
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-12T11:10:00Z
Last change time
2013-11-30T10:55:22Z
Keywords
diagnostic, pull, rejects-valid
Assigned to
nobody
Creator
bugzilla
Comments
Comment #0 by bugzilla — 2013-11-12T11:10:07Z
Reduced test case:
struct Foo
{
Bar b;
unittest
{
Foo f;
f = Foo();
}
}
struct Bar
{
~this() @safe { }
struct Inner { }
Inner* i;
}
As far as I can tell, the above is valid code, but when I run "dmd -c -unittest test.d", DMD spits out:
test.d(7): Error: function test.Foo.opAssign is not callable because it is annotated with @disable