fun getParent()

in src/main/kotlin/org/jetbrains/tinygoplugin/heapAllocations/toolWindow/model/TinyGoHeapAllocsTreeNodes.kt [46:51]


    fun <T> getParent(type: Class<T>): T? {
        val parent = parentDescriptor ?: return null
        @Suppress("UNCHECKED_CAST")
        if (type.isInstance(parent)) return parent as T
        throw IllegalStateException("unexpected node " + parent.javaClass)
    }