strictEquality ==
works even if the given CanEqual
fails
#13728
Replies: 2 comments
-
I would not call this as a bug, the spec only requires that a definition exists in context for |
Beta Was this translation helpful? Give feedback.
-
The reference says "the definition [of a CanEqual instance] ... has no significance for runtime behavior". It "affects type checking", but doesn't make plain what that means for compiletime.
The error message suggests that it is trying to
Maybe instead of "instances", the reference should speak of "proofs" or "typelevel conditions". Today's duplicate issue #22420 Workaround:
|
Beta Was this translation helpful? Give feedback.
-
If an implicit to the
CanEqual
is introduced and fails, the==
operation still compiles successfully.Compiler version
v3.1.0-RC3
Minimized code
Output
No error
Expectation
We should get the error "This should fail"
Beta Was this translation helpful? Give feedback.
All reactions