www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5096] New: More readable unpaired brace error


           Summary: More readable unpaired brace error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

--- Comment #0 from bearophile_hugs eml.cc 2010-10-21 15:16:28 PDT ---
This is a wrong D2 program:

void foo(int x)
    in {
        assert(x > 0);
    } body {
void main() {}

DMD 2.049 shows at compile-time:

test.d(7): unrecognized declaration

But that's not easy to understand. A simpler to understand error message may be
something like:

test.d(7): closing brace lacking a corresponding open brace.

Good error messages may shave away wasted seconds during debug, and seconds add

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