[Issue 6540] New: Default struct constructor problem

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 20 15:27:17 PDT 2011


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

           Summary: Default struct constructor problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-08-20 15:27:16 PDT ---
I don't understand what's happening here, but I think there is something wrong:


struct V3 {
    double[3] v;
    void foo() {
        auto v2 = v[] / 2;
        V3 r = V3(v2); // line 5
    }
}
void main() {}


DMD 2.055beta gives:

test.d(5): Error: cannot implicitly convert expression (v2) of type double[] to
double

-- 
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