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

Wrong implementation of Equality of simple class instances #734

Closed
Martin521 opened this Issue Aug 2, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@Martin521

Martin521 commented Aug 2, 2017

A type
type IB (i:int) = let mutable n = i
should have reference equality (according to F# spec).
I.e. IB(1)=IB(1) must be false.
FSC correctly implements this.
Websharper (Zafir) does not, and implements, it seems, deep equality.
It took me a day to isolate this in my code.

@Jand42

This comment has been minimized.

Show comment
Hide comment
@Jand42

Jand42 Aug 4, 2017

Member

This was planned a long time ago #543
Since this is can be a breaking change, WebSharper had structural equality by default for a long time, we never prioritized it but might revisit.

Member

Jand42 commented Aug 4, 2017

This was planned a long time ago #543
Since this is can be a breaking change, WebSharper had structural equality by default for a long time, we never prioritized it but might revisit.

@Martin521

This comment has been minimized.

Show comment
Hide comment
@Martin521

Martin521 Aug 9, 2017

It is a change, but at the same time just a bug.
A quite time-consuming bug.
I have ported a mid-sized project to client-side. Most of it went very smoothly. Some functions missing, but that I could work around. I love Websharper.
But this bug took me a long time to find (in my case it was of course not a boxed int, but a more complex type).

Martin521 commented Aug 9, 2017

It is a change, but at the same time just a bug.
A quite time-consuming bug.
I have ported a mid-sized project to client-side. Most of it went very smoothly. Some functions missing, but that I could work around. I love Websharper.
But this bug took me a long time to find (in my case it was of course not a boxed int, but a more complex type).

Jand42 added a commit that referenced this issue Aug 22, 2017

@Jand42 Jand42 closed this Aug 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment