ClassHierarchy.isSubtypeOf doesn't see Object as supertype of SomeClass[]

Issue #105 resolved
Roberts Kolosovs created an issue

classHierarchy.isSubtypeOf(someArrayType.asObjectType, objectType.asObjectType).isYes

returns false.

Comments (4)

  1. Michael Eichberg repo owner

    This code looks suspicious - someArrayType.asObjectType should always fail with an exception if someArrayType actually represents an ArrayType. (Recall, asObjectType is primarily a convenience method to avoid that users have to make explicit type casts.) If it doesn't fail, then the result does not seem to be that surprising.

    Or , in other words. If classHierarchy.isSubtypeOf(someArrayType.asObjectType, ObjectType.Object).isYes is actually false, then, please, let me know again.

    Hence, i will close this issue for the time being. Please, directly reopen this issue if you have two concrete examples.

  2. Log in to comment