[Issue 1441] Allow 'private' to restrict class visibility outside module or outer class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 10 12:34:24 PDT 2009


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





------- Comment #3 from smjg at iname.com  2009-04-10 14:34 -------
(In reply to comment #2)
> That's an entirely separate issue from this enhancement request.  The spec also
> does not say that 'pointless' attributes should trigger an error, so I don't
> see how it's "accepts-invalid" at all.

1. http://www.digitalmars.com/d/2.0/attribute.html#ProtectionAttribute
talks of "members".  Should we interpret this to include arbitrary members of a
module?

2. Where does the spec state that it's legal to use attributes that are not
applicable to the entity to which they're applied?  Otherwise it's reasonable
to assume that, should the compiler fail in its attempt to apply an attribute
to something, this failure is supposed to be by means of generating an error.

3. Making a class or similar entity private makes perfect sense.  Silently
ignoring attempts to do so makes absolutely none.


-- 



More information about the Digitalmars-d-bugs mailing list