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.
There was type piracy of
Base.copy
,because it was overloaded without any of the types belonging to this package.
This can cause spooky action at a distance -- just loading this package changes what
Base.copy
does even if you don't load the module directly.To be precise it turned what used to be a error into an unexpected behavior. This is misdemeanor type piracy. This is thus very unlikely to have actually caused anyone problems.
But still it is poor code form.
Fortunately the code has already been written to refer to
Copier.copy
in the place it is used.Which in this case previously resolved to
Base.copy
which was imported by default (check@which Copier.copy
). And theCopier
module doesn't useBase.copy
already, so we can just rmove theBase.
and it will shadow the name.Some people find shadowing spooky.
The alternative is to give it a different name. Or pass a type that you own to it.)
Related issues
There is no related issue.
Checklist
I am following the contributing guidelines
Tests are passing
Lint workflow is passing
Docs were updated and workflow is passing
CHANGELOG.md was updated
(I don't think this needs a changelog entry, since it should be invisible to errors unless they were hitting this very unlikely bug)