This PR adds the way Type.isDerivedFrom works. More concretly, we are once again taking the "wrap state" of the type into account. This means that pointer types and non-pointer types will not match even though their root types derive from each other. This was the way this function behaved in the past and it seems this was changed at some point.
This behaviour seems to be less-error prone because it led to some weird over-approximations in call resolving, basically ignoring wether a type was a pointer or not. To replicate the behaviour previous to the PR, you can use type.root.isDerivedFrom(other.root), if you really want to just match the root types.
This PR adds the way
Type.isDerivedFrom
works. More concretly, we are once again taking the "wrap state" of the type into account. This means that pointer types and non-pointer types will not match even though their root types derive from each other. This was the way this function behaved in the past and it seems this was changed at some point.This behaviour seems to be less-error prone because it led to some weird over-approximations in call resolving, basically ignoring wether a type was a pointer or not. To replicate the behaviour previous to the PR, you can use
type.root.isDerivedFrom(other.root)
, if you really want to just match the root types.