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
# New Ticket Created by Christian Bartolomaeus
# Please include the string: [perl #126700]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126700 >
rakudo.jvm seems to ignore that $pos is negative in the following example:
$