Bug 149 – Incorrect error message for a class left open

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-05-20T11:43:00Z
Last change time
2014-02-15T13:19:24Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2006-05-20T11:43:55Z
-- 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.
Comment #1 by matti.niemenmaa+dbugzilla — 2006-06-04T14:52:33Z
Fixed in DMD 0.160. The new and improved error message reads "} expected following member declarations in aggregate".