Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error message when trying to use negative index: [4, 8, 15, 16, 23][* - 42] #4695

Closed
p6rt opened this issue Oct 30, 2015 · 5 comments
Closed
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded

Comments

@p6rt
Copy link

p6rt commented Oct 30, 2015

Migrated from rt.perl.org#126503 (status was 'resolved')

Searchable as RT126503$

@p6rt
Copy link
Author

p6rt commented Oct 30, 2015

From @AlexDaniel

Code​:
[4, 8, 15, 16, 23][* - 42];

Result​:
Index out of range. Is​: -37, should be in 0..Inf
  in block <unit> at ./test3.pl​:2

Actually thrown at​:
  in block <unit> at ./test3.pl​:2

This error message makes me want to try [Inf] or [* + Inf].

<lizmat> Perhaps "Effective index out of range" would be a better message

Yeah, perhaps!

@p6rt
Copy link
Author

p6rt commented Oct 30, 2015

From @lizmat

Fixed with b8557900cd896b8baf , tests needed

On 30 Oct 2015, at 20​:19, Alex Jakimenko (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Alex Jakimenko
# Please include the string​: [perl #​126503]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126503 >

Code​:
[4, 8, 15, 16, 23][* - 42];

Result​:
Index out of range. Is​: -37, should be in 0..Inf
in block <unit> at ./test3.pl​:2

Actually thrown at​:
in block <unit> at ./test3.pl​:2

This error message makes me want to try [Inf] or [* + Inf].

<lizmat> Perhaps "Effective index out of range" would be a better message

Yeah, perhaps!

@p6rt
Copy link
Author

p6rt commented Oct 30, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 4, 2016

From @zoffixznet

On Fri Oct 30 13​:29​:32 2015, elizabeth wrote​:

Fixed with b8557900cd896b8baf , tests needed

Thank you. Tests added​: Raku/roast@7a5ad3c3be

@p6rt
Copy link
Author

p6rt commented Jul 4, 2016

@zoffixznet - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 4, 2016
@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testneeded labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded
Projects
None yet
Development

No branches or pull requests

1 participant