[Issue 2716] Confusion of auto and scope as the class attribute

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 14 10:23:05 PDT 2009


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





--- Comment #12 from Stewart Gordon <smjg at iname.com>  2009-07-14 10:23:04 PDT ---
(In reply to comment #11)
> I've switched the error message to "both auto and explicit type given". auto
> class C {} will still trigger the "storage class has no effect" one though. I
> don't think error messages of this kind are avoidable if you want to make
> directly applying inapplicable storage classes an error.

Probably 99% of poorly written error messages can be improved if only one stops
to think about it.

How about "auto cannot be applied to classes" or "auto can only be applied to
variable declarations"?  We could use the same format for all illegal uses of
attributes.

Of course, the relevance of this to auto'll change when/if the grammar change
proposed in comment 9 is implemented....

-- 
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