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

ua: do not panic if the same extension object is registered multiple times #579

Merged
merged 1 commit into from
May 6, 2022

Conversation

magiconair
Copy link
Member

TypeRegistry.Register panics even if the same type is registered under the same node id multiple times. This makes testing harder where an Init method is registering the type on the fly. This becomes necessary for example when the namespace id isn't known during compile time.

This patch relaxes the rule a bit by allowing duplicate registrations of the same id/type combination.

@magiconair magiconair added this to the v0.3.4 milestone May 6, 2022
@magiconair magiconair merged commit 4e46cdb into main May 6, 2022
@magiconair magiconair deleted the fs/ignore-duplicate-extobj-regs branch May 6, 2022 13:30
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

Successfully merging this pull request may close these issues.

1 participant