On Tue, May 03, 2005 at 08:29:22AM -0400, Aaron Sherman wrote:
: On Tue, 2005-05-03 at 08:07, Larry Wall wrote:
: > On Tue, May 03, 2005 at 07:59:19AM -0400, Aaron Sherman wrote:
: 
: > : On a side note about auto-accessors, if I say:
: > : 
: > :   class X {
: > :           has $.foo;
: > :   }
: > :   class Y is X {
: > :           has %.foo;
: > :   }
: > : 
: > : What happens to the accessors for X.foo?
: > 
: > Overridden just like any such method.
: 
: Are has declarations ordered as they appear?
: 
: That is, does:
: 
:       has $.foo;
:       has %.foo;
: 
: give me an accessor for %.foo or for whatever one happened to be
: declared last?

Neither--I'd think that'd be a fatal compile-time error.

: NOTE: Either way, I think the above should at least issue a warning that
: you're overriding the definition of the auto-accessor declared within
: the same class definition, and the same should probably happen with
: composition sources (though not inheritance). This is implied in S12
: when it says that roles auto-detect conflicting methods, but should
: explicitly refer to attributes as well.

Probably.

Larry

Reply via email to