[Issue 5096] New: More readable unpaired brace error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 21 15:17:10 PDT 2010


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

           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 at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


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


void foo(int x)
    in {
        assert(x > 0);
    } body {
        x++;
    }
}
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
up.

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


More information about the Digitalmars-d-bugs mailing list