# New Ticket Created by  Christian Bartolomaeus 
# Please include the string:  [perl #130150]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130150 >


The following code dies with StringIndexOutOfBoundsException on rakudo-j:

$ ./perl6-j -e '+"120e"'
WARNINGS for -e:
Useless use of "+" in expression "+\"120e\"" in sink context (line 1)
java.lang.StringIndexOutOfBoundsException: String index out of range: 4
  in sub parse-int-frac-exp at gen/jvm/CORE.setting line 30717
  in sub parse-simple-number at gen/jvm/CORE.setting line 30841
  in sub parse-real at gen/jvm/CORE.setting line 30847
  in sub val at gen/jvm/CORE.setting line 30868
  in method Numeric at gen/jvm/CORE.setting line 12738
  in sub prefix:<+> at gen/jvm/CORE.setting line 10006
  in block <unit> at -e line 1

It is supposed to return a Failure like that:

$ ./perl6-m -e 'say +"120e" ~~ Failure'
True

It looks like this was introduced with commit cb9df2bd40 (if I revert that 
commit,
the code works as expected).

I'm going to fudge (skip) the test, since I don't have time to look for a fix
at the moment.

Reply via email to