Skip to content

Conversation

@shargon
Copy link
Member

@shargon shargon commented Dec 15, 2025

If it's possible to change the InnerData, it should be possible to invalidate the hashcode or we can produce errors, and it is not possible to replicate in a new jump table some behaviors

Required for neo-project/neo#4381

@Wi1l-B0t
Copy link

Wi1l-B0t commented Dec 16, 2025

It's better not to cache the hashcode for mutable item.

Copy link
Member

@erikzhang erikzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need a hash code? It can't be a key of a dictionary. As well as CompoundType, they don't need a GetHashCode(). Use the default one, or just throws NotSupportedException.

@shargon
Copy link
Member Author

shargon commented Dec 16, 2025

Why does it need a hash code? It can't be a key of a dictionary. As well as CompoundType, they don't need a GetHashCode(). Use the default one, or just throws NotSupportedException.

Is mutable, it's a bad key for a dictionary

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.

5 participants