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

           Summary: null implicitly converts to any other type on array
                    assignment
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-11-10 12:06:42 PST ---
The following code compiles and shouldn't:

struct Foo {
    double num;
}

void main() {
    Foo[] foo = new Foo[5];
    foo[] = null;
}

It then fails at runtime with the following nonsensical error message:

object.Exception: lengths don't match for array copy

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

Reply via email to