Skip to content

Fix computation of hash code for class objects #2840

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

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

josesimoes
Copy link
Member

Description

  • Pointer is addressing the class fields.
  • Now XORing with hash code for each field instead of just replacing the last one.

Motivation and Context

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

- Pointer is addressing the class fields.
- Now XORing with hash code for each field instead of just replacing the last one.
@nfbot nfbot added the Type: bug label Dec 6, 2023
@josesimoes josesimoes added the Area: Common libs Everything related with common libraries label Dec 6, 2023
@josesimoes josesimoes merged commit 1a5ca06 into nanoframework:main Dec 6, 2023
@josesimoes josesimoes deleted the fix-class-hashcode branch December 6, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common libs Everything related with common libraries Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GetHashCode is not working correctly for class objects
2 participants