Adjust eq()
to work properly with reserved primitive / elementary types
#160
Labels
bug
Something isn't working
Description
Consider following case:
It actually will return
false
. However it does not seem to be bug, as it is intended behavior.Context
We can not reuse
types
(liketypes.bool
and etc) inInferType.elementaryTypeNameStringToTypeNode()
due toeq()
will fail when comparing complex types. For example:This is the result of
eq()
s way to handle recursion viavisited
cache map and store only one corresponding element.We can reduce amount of allocations if we find a way fix
eq()
s behavior. However, we should also consider to not cause much allocations duringeq()
. One of the ways - do not cache primitive type nodes there.The text was updated successfully, but these errors were encountered: