boolean (@NotNull Exact other) { if (equals(other)) return true; if (other instanceof PrimitiveArray || other instanceof ExactArray || other instanceof Unresolved) return true; if (other instanceof ExactClass exactClass) { return exactClass.classDef.isInheritor(myReference); } if (other instanceof ExactSubclass subclass) { for (Exact superClass : subclass.mySupers) { if (isAssignableFrom(superClass)) return true; } } return false; }