On Thu, Aug 18, 2005 at 03:33:35AM +0800, Yiyi Hu wrote:
: class T
: {
: has $.a =1;
: my $.a=2;
: };
: my T $o .= new;
: $o.a().say;
: 
: What the result will be please?
: 1 or 2?
: Or an error?

Definitely a compile-time error.  You can't declare the same lexical
name even if the declarator is different.  But even if that were
allowed, you also may not declare two attributes that generate an
accessor of the same name.

Larry

Reply via email to