You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
On Mon, 21 Nov 2016 23:22:04 -0800, bartolin@gmx.de wrote:
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.
Migrated from rt.perl.org#130150 (status was 'resolved')
Searchable as RT130150$
The text was updated successfully, but these errors were encountered: