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

           Summary: [REG][2.061 -> 02.061a] struct constructor taking
                    itself creates "Warning: statement is not reachable"
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-01-17 08:04:46 PST ---
Most probably *just* introduced: the packaged 2.061 doesn't create this, but
the latest githead produces the bug.

Produced with dmd with both debug and release. win32 on a win7_64.

//----
Program:
//----
struct S
{
    this(S) // <- Line 3 here
    {
        assert(0, "unreachable?");
    }
}

void main()
{
    S a;
    S b = S(a);
}
//----

//----
Compiler switch:
//----
rdmd -wi -O main.d
//----

//----
Compiler output
//----
main.d(3): Warning: statement is not reachable
//----

The irony here is that running the program gives:
//----
[email protected](5): unreachable?
//----

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

Reply via email to