[Issue 9077] New: Struct copy constructor ignored when opAssign with a different type is present

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 25 10:13:18 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9077

           Summary: Struct copy constructor ignored when opAssign with a
                    different type is present
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: siegelords_abode at yahoo.com


--- Comment #0 from siegelords_abode at yahoo.com 2012-11-25 10:13:17 PST ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list