improve interface error messages (#25228)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25228
This adds a facility to isSubtypeOf for it to explain why a type is
not a subtype of something else. It is used in situations where it
is not clear from the types python_str alone why the relationship
is now true. Because of subtle interaction between default arguments,
overloads, and virtual methods, it uses isSubtypeOfExt for the extended
version to avoid requiring readers to understand the interaction.
Test Plan: Imported from OSS
Differential Revision: D17066673
Pulled By: zdevito
fbshipit-source-id: 4de7c40fbf7f9eeae045d33a89a038538cf87155