www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 977] New: Wrong line number reported for a missing comma in an array initializer within a struct initializer

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

           Summary: Wrong line number reported for a missing comma in an
                    array initializer within a struct initializer
           Product: D
           Version: 1.006
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


struct S {
        int[] x;
}

S s =
{
        [
                1, 2, 3,

                4, 5, 6

                7, 8, 9 // error line number should be here (line 12)

        ]
}                       // but is here (line 15)
;

If an array is initialized directly and there's no struct initializer, the line
number is reported correctly.


-- 
Feb 17 2007