I need to be able to compare Class objects relatively to the hierarchy of their parent types.
I want some method to compare Class[A] and Class[B].
I need some kind of method that takes class objects and would return true when A extends B
Obviously I can’t use isInstanceOf because Class is not covariant.
Class[A].isInstanceOf[Class[B]] returns false. What would return true in that case?
Try
Class.isAssignableFrom(Class):