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

Array indices in list context should result in a list in Rakudo #676

Closed
p6rt opened this issue Feb 3, 2009 · 5 comments
Closed

Array indices in list context should result in a list in Rakudo #676

p6rt opened this issue Feb 3, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Feb 3, 2009

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

Searchable as RT63014$

@p6rt
Copy link
Author

p6rt commented Feb 3, 2009

From @masak

<masak> I just got bitten by a logical bug of sorts​: @​array[0..0]
results in an element, not in a list.
<masak> what would be the best way to make sure that it is a list I
get? @​array[0..0].list?
<moritz_> aye
<masak> seems to work.
<masak> I expect to be bitten by this one in the future, too. :/
<masak> especially since the endpoints of the range need not be literals.
<TimToady> I think use of a range operator should imply list
<TimToady> much like @​array[0,] should
<masak> one should think so, yes...
<masak> what do the synopses think?
<TimToady> does @​array[0..0,] work?
<masak> moritz_​: the problem, as I hinted, is that my zeroes aren't literals.
<TimToady> or @​array[0..0,()] ?
<masak> TimToady​: I'll try, hold on.
<masak> TimToady​: no and no, respectively :/
<TimToady> whatever interpolates a range into a capture should make
sure it's listy in list context
<TimToady> but I'm not sure rakudo really believes in Captures yes
<masak> seems not.
* masak hesitates on the rakudobug submit button
* moritz_ shouts "go, go, go!"
* mberends too
* masak goes, goes, goes

@p6rt
Copy link
Author

p6rt commented Jul 17, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in b/t/spec/S09-subscript_slice/slice.t

@p6rt
Copy link
Author

p6rt commented Jul 17, 2009

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

@p6rt
Copy link
Author

p6rt commented Jul 7, 2010

From @pmichaud

Resolved as of ddf224; tests exist in S09-subscript_slice/slice.t .
Note that slices currently return Parcel instead of List (so the test
checks for ~~ Positional).

Pm

@p6rt
Copy link
Author

p6rt commented Jul 7, 2010

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

@p6rt p6rt closed this as completed Jul 7, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant