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

           Summary: Missing line number and bad error messages with a
                    wrong functions array initialization
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-09-23 08:03:31 PDT ---
This is correct code:

int function(int)[] foos = [x => 0];
void main() {}


This wrong program is the same, but it lacks the []:

int function(int) foos = [x => 0];
void main() {}


DMD 2.061alpha gives on the second program:

temp.d(1): Error: cannot implicitly convert expression (__lambda2) of type int
function(int x) pure nothrow @safe to int(int)
Error: no size for type int(int)


Some problems:
- The first line doesn't seem to mention that foos is not typed as an array.
- The second error message lacks a line number:
- I am not sure that "no size for ..." is correct.

(This bug has severity 'major' as Don asked me for error messages missing line
numbers.)

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

Reply via email to