www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5948] New: Different error messages for int array

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

           Summary: Different error messages for int array
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



A wrong D2 program:


void main() {
         int[] arr1 = [[1]];
    enum int[] arr2 = [[1]];
}


DMD 2.053beta gives:
test.d(2): Error: cannot implicitly convert expression ([[1]]) of type int[][]
to int[]
test.d(3): Error: cannot use array to initialize int

In this case I expect to receive two times the first error message.

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