If a function gets called with two different argument types A and B that have a common base class C, we may want to infer C as the argument type instead of Union[A, B] -- unless C is object or some other type that isn't interesting.
To implement this, we could record the MROs of all types in the profile.
If a function gets called with two different argument types
A
andB
that have a common base classC
, we may want to inferC
as the argument type instead ofUnion[A, B]
-- unlessC
isobject
or some other type that isn't interesting.To implement this, we could record the MROs of all types in the profile.