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

Changed behavior when assigning to array but not providing all elements (@b[1, 2, 3] = True) #5929

Open
p6rt opened this issue Dec 29, 2016 · 2 comments
Labels
regression Issue did not exist previously

Comments

@p6rt
Copy link

p6rt commented Dec 29, 2016

Migrated from rt.perl.org#130432 (status was 'new')

Searchable as RT130432$

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @AlexDaniel

Code​:
my @​b;
@​b[1, 2, 3] = True;
@​b.perl.say

Result (2015.10)​:
[Any, Bool​::True, Any, Any]

Result (2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10)​:
[Any, Bool​::True, Mu, Mu]

Result (2016.11,2016.12,HEAD)​:
[Any, Bool​::True, Any, Any]

I have no idea which behavior is right, but perhaps this ticket will help to add a test (so that we are not swinging back and forth between different behaviors). Output on 2015.10 is shown for reference only, just to demonstrate that we already had this behavior at some point.

@p6rt
Copy link
Author

p6rt commented Dec 29, 2016

From @AlexDaniel

On 2016-12-28 19​:26​:16, alex.jakimenko@​gmail.com wrote​:

Code​:
my @​b;
@​b[1, 2, 3] = True;
@​b.perl.say

Result (2015.10)​:
[Any, Bool​::True, Any, Any]

Result
(2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,2016.09,2016.10)​:
[Any, Bool​::True, Mu, Mu]

Result (2016.11,2016.12,HEAD)​:
[Any, Bool​::True, Any, Any]

I have no idea which behavior is right, but perhaps this ticket will
help to add a test (so that we are not swinging back and forth between
different behaviors). Output on 2015.10 is shown for reference only,
just to demonstrate that we already had this behavior at some point.

Ah, by the way, the latest change was introduced in rakudo/rakudo@c541b3e
Pre-6c change was in rakudo/rakudo@d192f1c

Both commits do not indicate that anything like this should've been changed, therefore a ticket.

@p6rt p6rt added the regression Issue did not exist previously label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

1 participant