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

* A Parrot error is thrown once the code is run. Even if code like
this gets through the parsing stage (and we can't stop, say, integers
in variables being array-indexed), the error should be trapped by
rakudo.

* Some magical limit between 999999 and 1000000 makes the error start
talking about 'Float' rather than 'Integer'. This is also the point
when numbers are written in exponential form, as 1+e6. Perl 5 handles
integers of much higher magnitude by default.

Perl 5.8 has a simple solution to array indexing of integers:

$ perl -e 1[1]'
syntax error at -e line 1, near "1["

Reply via email to