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

Option equality broken #74

Closed
jorge-fernandes opened this issue Jan 10, 2023 · 2 comments
Closed

Option equality broken #74

jorge-fernandes opened this issue Jan 10, 2023 · 2 comments

Comments

@jorge-fernandes
Copy link

Hi,

stumbled upon a new equality issue

Option.of(Vector.of(12, 2674)).equals(Option.of(null))

yields true

i'm on "prelude-ts": "1.0.5"

@emmanueltouzery
Copy link
Owner

well, that's very crappy. I'll fix it tonight my time. I see the problem...

    if (obj === null != obj2 === null) {
        return false;
    }

due to operator priority the bracketing was wrong...

  if ((obj === null) != (obj2 === null)) {
    return false;
  }

this fixes it. I'll push and release tonight.

@emmanueltouzery
Copy link
Owner

I have now released 1.0.6 on npm. Sorry for the bad bug 😬

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

No branches or pull requests

2 participants