-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Shared ambiguity instance #3146
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, @nieqiurong ,
I could be wrong, but this seems to make the error message less informative.
Please add a test case.
Ah, I see, you are now using |
imo, if we are going to throw an exception when an ambiguous key is detected, we might as well remove the inner class entirely and do that where it is detected, as essentially this just makes it a kind of a maker interface and |
Yes, because the key is originally the value that was put in. When the key value is repeated, we can use a fixed value as the value, which can be a specific Object. |
I'll modify it later. |
da0f8c9
to
b16b4d1
Compare
I think we can remove |
b16b4d1
to
4a9d42c
Compare
When a conflicting key is encountered when generating a short key, we can share an instance to reduce memory usage.