Carl MXXsak (via RT) wrote:
> # New Ticket Created by  "Carl Mäsak" 
> # Please include the string:  [perl #57790]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57790 >
> 
> 
> r30166:
> $ perl6 -e '999999[1]'
> get_pmc_keyed() not implemented in class 'Integer'
> [...]
> $ perl6 -e '1000000[1]'
> get_pmc_keyed() not implemented in class 'Float'
> [...]
> 
> So:
> 
> * For some reason, a literal integer followed by an array index makes
> it though parsing. Is it really valid standard Perl 6 syntax?

Yes. Imagine

class Int is also { method postcircumfix:<[ ]> { ... } }

In general .[] and .{} are just method calls with a fancy syntax, so
they are allowed everywhere (but might throw runtime errors).

Cheers,
Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/ |  http://perl-6.de/

Reply via email to