You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whereas we reject some uses of equality, such as #710
we do not reject this example and instead treat it as if A was a case class, leading to proving assertion that fails at runtime:
I propose that we reject this for now. Allowing it would require at least a minimal global state of an allocator (a counter) and is perhaps best handled along with some notion of heap references.
The text was updated successfully, but these errors were encountered:
Maybe a similar check should be done as for #710 (except that we don't want this in non-ghost code either). When do we even want non-case classes to start with?
vkuncak
changed the title
Equality between non-case classes not rejected
Equalities to be rejected: Double, functions, allocatable non-case classes, type vars
May 21, 2024
Note that the reason we have equality by default and opt into its absence with noEq, in contrast to ML and Haskell is that we want to have equality by default and we want to put syntactic burden on those evil non-equality types. This is analogous to how we treat @mutable.
Whereas we reject some uses of equality, such as #710
we do not reject this example and instead treat it as if A was a case class, leading to proving assertion that fails at runtime:
I propose that we reject this for now. Allowing it would require at least a minimal global state of an allocator (a counter) and is perhaps best handled along with some notion of heap references.
The text was updated successfully, but these errors were encountered: