-
Notifications
You must be signed in to change notification settings - Fork 587
Extra tests for array/list slices in scalar context #23481
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
base: blead
Are you sure you want to change the base?
Conversation
t/op/array.t
Outdated
# GH #23447 - ensure that future optimizations don't break behaviour | ||
{ | ||
my @x = "a" .. "d"; sub f {} my $y = @x[2, 3, f()]; | ||
is $y, d, 'Non-returning final sub element in array slice in scalar context'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not have "return" but it does return an empty list.
Maybe "Empty list returning final sub element..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the changed text: "Trailing empty list return in..."?
004a040
to
7c46b31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concerns have been addressed. It's up to Tony now. Thanks.
A small number of extra tests off the back of #23447.