File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
java/kotlin-extractor/src/main/kotlin/utils Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,18 @@ fun getIrElementBinaryName(that: IrElement): String {
44
44
is IrDeclarationWithName -> getName(that)
45
45
else -> " (unknown-name)"
46
46
}
47
+
47
48
val internalName = StringBuilder (shortName)
49
+ if (that !is IrClass ) {
50
+ val parent = that.parent
51
+ if (parent is IrFile ) {
52
+ // Note we'll fall through and do the IrPackageFragment case as well, since IrFile <: IrPackageFragment
53
+ internalName.insert(0 , getFileClassName(parent) + " $" )
54
+ }
55
+ }
56
+
48
57
generateSequence(that.parent) { (it as ? IrDeclaration )?.parent }
49
58
.forEach {
50
- if (it is IrFile ) {
51
- // Note we'll fall through and do the IrPackageFragment case as well, since IrFile <: IrPackageFragment
52
- internalName.insert(0 , getFileClassName(it) + " $" )
53
- }
54
59
when (it) {
55
60
is IrClass -> internalName.insert(0 , getName(it) + " $" )
56
61
is IrPackageFragment -> it.fqName.asString().takeIf { fqName -> fqName.isNotEmpty() }?.let { fqName -> internalName.insert(0 , " $fqName ." ) }
You can’t perform that action at this time.
0 commit comments