Ok, maybe what it should return would be some sort of ReversedRange object?
I guess this could be considered a feature request, but, I'd like is for
(^5).reverse.reverse
and similar to be able to produce a Range.
-Original Message-
From: Moritz Lenz via RT
Sent: Friday, November 20,
# New Ticket Created by Zoffix Znet
# Please include the string: [perl #126711]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126711 >
See this conversation and results from camelia for details:
After Rakudo commit negative start positions are disallowed:
$ perl6 -e 'say index("xxy", "y", -1).perl'
Failure.new(exception => X::OutOfRange.new(what => "Position in index", got =>
-1, range => "0..3", comment => Any), backtrace => Backtrace.new)
Tested in S32-str/index.t and
It looks like the overflow still happens. (Expected result is different
nowadays, since negative start positions are disallowed (see
https://github.com/rakudo/rakudo/commit/fa3ce116e3).
See also http://irclog.perlgeek.de/perl6/2015-11-21#i_11577908
$ perl6-m -e 'say index("xxy", "y",
# New Ticket Created by "Brian S. Julin"
# Please include the string: [perl #126708]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126708 >
This is a regression since star09 which make Grammar more tedious to subclass.