www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Bug 149] New: Incorrect error message for a class left open

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: deewiant 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.


-- 
May 20 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=149


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed in DMD 0.160. The new and improved error message reads "} expected
following member declarations in aggregate".


-- 
Jun 04 2006