-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix Array & Dictionary copy constructor #69117
base: master
Are you sure you want to change the base?
Conversation
Oh dear... |
I think we should make it work instead. Considering it works with other Array-like types, the fact that this breaks is worrisome. |
The problem with normal Arrays is, they may contain any type of Variant, so either references or values. Therefore, should the constructor create a deep copy of all nested references as well, or not? |
@Mickeon I would expect an array copy to be a shallow copy by default. |
Let's see how to go about this... |
c7c3ce5
to
69197a5
Compare
Updated the PR outright to just fix the constructor. One may consider not keeping the "typed" as an oddity, but I'm not sure how to exactly go about that right now. Probably would need a new constructor for a particularly niche situation... |
f5f7885
to
9a74c8a
Compare
Updated the PR to fix the constructor for Dictionaries, too, which have the same issue. However, the Linux build fails and I'm not exactly sure as to why:
|
9a74c8a
to
8759340
Compare
Force pushed because of a minor grammatical mistake. |
8759340
to
310909c
Compare
Rebased. Hoping this one in particular gets seen. |
310909c
to
fcd98e1
Compare
Fixed typo. |
The description states:
Case and point:
And if you do want a copy,
Array.duplicate
exists already and it is more explicit.This PR removes the constructorThis PR fixes the Array and Dictionary constructor, that was probably meant for consistency with the Packed Arrays (whose constructor equivalent works completely fine).