IR: improve toString for symbols
This commit is contained in:
@@ -29,7 +29,8 @@ abstract class IrSymbolBase<out D : DeclarationDescriptor>(
|
|||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
if (isBound) return owner.render()
|
if (isBound) return owner.render()
|
||||||
return "Unbound private symbol ${super.toString()}"
|
return "Unbound private symbol " +
|
||||||
|
if (_descriptor != null) "${this::class.java.simpleName}: $_descriptor" else super.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ abstract class IrPublicSymbolBase<out D : DeclarationDescriptor> @OptIn(Obsolete
|
|||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
if (isBound) return owner.render()
|
if (isBound) return owner.render()
|
||||||
return "Unbound public symbol for $signature"
|
return "Unbound public symbol ${this::class.java.simpleName}: $signature"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1128,9 +1128,6 @@ val SymbolTable.allUnbound: Set<IrSymbol>
|
|||||||
fun SymbolTable.noUnboundLeft(message: String) {
|
fun SymbolTable.noUnboundLeft(message: String) {
|
||||||
val unbound = this.allUnbound
|
val unbound = this.allUnbound
|
||||||
assert(unbound.isEmpty()) {
|
assert(unbound.isEmpty()) {
|
||||||
"$message\n" +
|
message + "\n" + unbound.joinToString("\n")
|
||||||
unbound.joinToString("\n") {
|
|
||||||
"${it::class.simpleName} $it ${it.signature?.toString() ?: "(NON-PUBLIC API)"}: ${it.descriptor}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user