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.clone loses descriptor and Nils #1435

Closed
zoffixznet opened this issue Jan 23, 2018 · 0 comments
Closed

Array.clone loses descriptor and Nils #1435

zoffixznet opened this issue Jan 23, 2018 · 0 comments

Comments

@zoffixznet
Copy link
Contributor

A fix to clone the descriptor would just be nqp::p6bindinvres with nqp::clone of $!descriptor attribute, but I didn't right away see a way to keep the Nils around (i.e. looks like the Array.from-iterator loses them before we get a chance to bind the descriptor):

<Zoffix__> m: my @a is default(Nil) = Nil; dd @a.clone[^3]
<camelia> rakudo-moar 0a1641e94: OUTPUT: «(Any, Any, Any)␤»
zoffixznet added a commit that referenced this issue Jan 23, 2018
Rip out code from Array.from-iterator original code indirectly
uses and make it use cloned descriptor when creating the clone.

Phixes: #1435
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