From b6e37c1f89deb01a25d17935ec8f2648e9f250bd Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Wed, 11 Nov 2020 17:02:16 +0300 Subject: [PATCH] [IR] KotlinLikeDumper: print class name for callable references without receivers --- .../src/org/jetbrains/kotlin/ir/util/KotlinLikeDumper.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/KotlinLikeDumper.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/KotlinLikeDumper.kt index 670b6cb3fd2..096cd10c276 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/KotlinLikeDumper.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/KotlinLikeDumper.kt @@ -1360,6 +1360,14 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption } private fun IrCallableReference<*>.printCallableReferenceWithNoIndent(valueParameters: List, data: IrDeclaration?) { + // TODO where from to get type arguments for a class? + // TODO rendering for references to constructors + if (dispatchReceiver == null && extensionReceiver == null) { + (symbol.owner as IrDeclaration).parentClassOrNull?.let { + p.printWithNoIndent(it.name.asString()) + } + } + printMemberAccessExpressionWithNoIndent( referencedName.asString(), // effectively it's same as `symbol.owner.name.asString()` valueParameters,