This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
BaseInstance:Clone #180
Open
Kampfkarren
wants to merge
14
commits into
LPGhatguy:master
Choose a base branch
from
Kampfkarren:clone
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
BaseInstance:Clone #180
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This design seems pretty nifty! We should be careful not to clone instances unless they're children, I noticed that the default clone implementation clones Instances! |
I think I covered everything. |
Cloning objects like |
Vector3s don't hash.
And their equality isn't overriden. That was in the test. They have custom Lines 60 to 62 in 5d4536e
Enums do which is why they're just an identity function. |
luacov seems to think I didn't cover the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #143.
I like the idea behind how this is implemented, sort of an
impl Clone
feel. Looking for feedback on this design before moving forward.Also thinking instead of a long if statement of every possible type, types implement their own
:Clone
functionality and iftype(x) == "userdata"
buttypeof(x) ~= "userdata"
then it attempts to call it.Doesn't clone children yet, just want a comment about the design before going forward.