From 9aed55a1f4986f341d208d800acaf540ec0bb24c Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 13 Apr 2021 22:54:05 +0200 Subject: [PATCH] IR: minor, improve toString for IrBasedTypeParameterDescriptor The motivation is that in the "Unbound symbols are not allowed" error message like the one in KT-46069, the type parameter is rendered via `render()`, and that contains only its name/variance, and doesn't help in finding where the member with that type parameter is declared. --- .../org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt index 30ed8469043..9e58a69d64a 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt @@ -304,6 +304,7 @@ open class IrBasedTypeParameterDescriptor(owner: IrTypeParameter) : TypeParamete visitor!!.visitTypeParameterDescriptor(this, null) } + override fun toString(): String = super.toString() + "\nParent: $containingDeclaration" } fun IrTypeParameter.toIrBasedDescriptor() = IrBasedTypeParameterDescriptor(this)