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

Fix equal-always? on fl/fxvector, stencil-vector #4984

Merged
merged 4 commits into from Apr 28, 2024

Conversation

AlexKnauth
Copy link
Member

@AlexKnauth AlexKnauth commented Apr 26, 2024

Checklist
  • Bugfix
  • tests included

Description of change

Fixes equal-always? and chaperone-of? on flvector, fxvector, and stencil-vector, to return false on different values with the same contents at the time, because they are mutable.

Fixes #4983.

  • equality tests
  • hash-code tests
  • Racket CS
  • Racket BC

@mflatt
Copy link
Member

mflatt commented Apr 26, 2024

Looks ok to me. I worry a little that the fallthrough to #%equal? has changed, or maybe I'm misreading; even if I'm reading right, I can't see any reason that the change would create a problem.

@AlexKnauth
Copy link
Member Author

Yes, the fallthrough to #%equal? has changed in that it only falls through to that when the mode is equal? or impersonator-of?, not equal-always? or chaperone-of?. Are there any more immutable data structures that would need that fall through that I haven't accounted for?

@mflatt
Copy link
Member

mflatt commented Apr 26, 2024

There are no more that I can think of.

In trying some things, I discovered that paths are currently not handled right for equal-always?. The repairs (which I have ready to push later) are independent of your changes. If there's something else wrong like that on CS, I expect the problem will be again with the struct and not with equal?.

@mflatt mflatt merged commit 4433205 into racket:master Apr 28, 2024
7 checks passed
@AlexKnauth AlexKnauth deleted the equal-always-flvector-fxvector branch April 28, 2024 16:03
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.

flvector? and fxvector? are missing equal-always? support
2 participants