-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
The result of hierarchy.findSubClasses(cp.findClass<Any>(), allHierarchy = false)
returns an empty sequence. I expect those classes and interfaces from cp
, which don't have an explicit supertype. See the example below:
import org.jacodb.api.ext.findClass
import org.jacodb.impl.features.InMemoryHierarchy
import org.jacodb.impl.features.hierarchyExt
import org.jacodb.impl.jacodb
suspend fun main() {
val db = jacodb {
useProcessJavaRuntime()
installFeatures(InMemoryHierarchy)
}
val cp = db.classpath(emptyList())
val hierarchy = cp.hierarchyExt()
val subClassesComparable = hierarchy.findSubClasses(cp.findClass<Comparable<*>>(), allHierarchy = false).count()
val subClassesAny = hierarchy.findSubClasses(cp.findClass<Any>(), allHierarchy = false).count()
check(subClassesComparable > 0)
check(subClassesAny > 0) // fails here
}
Details
- The issue still exists, if we don't use
InMemoryHierarchy
feature - Using
allHierarchy = true
still returns an empty sequence
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working