[Bug 149] New: Incorrect error message for a class left open

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 20 09:43:57 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=149

           Summary: Incorrect error message for a class left open
           Product: D
           Version: 0.157
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: trivial
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com


--
class c {
--

The above code causes DMD to error with "filename.d(1): struct member
expected".

First, what does a struct have to do with anything? That's a class, not a
struct. So at the very least the message should read "class member expected".

But second, since what is actually missing is an ending curly bracket for class
c, the message should, in my opinion, suggest something towards that end. After
all, adding more members to the struct (sic) doesn't solve the problem, but
adding an ending '}' does.


-- 




More information about the Digitalmars-d-bugs mailing list