Why does freezed == compare runtimType ?
#1263
Unanswered
lecuivre-alban
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
It's necessary since classes can be generic Given |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The generated equal method with freezed compare both the
runtimeTypeand the type usingis.Something like this :
Why is it configured that way ? This behavior prevent inheritance/polymorphism equalities.
In my case I had an issue with a subclass/implementation of
MyObject, that was implementing==to be comparable toMyObjectobjets. SoMySubClass == FreezedClasswas true butFreezedClass == MySubClasswas false...Beta Was this translation helpful? Give feedback.
All reactions