Bug 9077 – Struct copy constructor ignored when opAssign with a different type is present
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-25T10:13:00Z
Last change time
2012-12-03T17:30:43Z
Keywords
pull
Assigned to
nobody
Creator
siegelords_abode
Comments
Comment #0 by siegelords_abode — 2012-11-25T10:13:17Z
Compiles fine with 2.060, fails with 2.061 beta.
struct A
{
void opAssign(int a)
{
}
void test()
{
A a;
a = this;
}
this(this)
{
}
}
// test.d(11): Error: function test.A.opAssign (int a) is not callable using argument types (A)
// test.d(11): Error: cannot implicitly convert expression (this) of type A to int