IR: add descriptor to "unbound symbols not allowed" message

This will help in diagnosing problems such as KT-45236.
This commit is contained in:
Alexander Udalov
2021-03-09 13:58:34 +01:00
parent e3dc112c5f
commit 8294aed40c
@@ -1114,12 +1114,13 @@ val SymbolTable.allUnbound: Set<IrSymbol>
return r.filter { !it.isBound }.toSet()
}
@OptIn(ObsoleteDescriptorBasedAPI::class)
fun SymbolTable.noUnboundLeft(message: String) {
val unbound = this.allUnbound
assert(unbound.isEmpty()) {
"$message\n" +
unbound.joinToString("\n") {
"$it ${it.signature?.toString() ?: "(NON-PUBLIC API)"}"
"$it ${it.signature?.toString() ?: "(NON-PUBLIC API)"}: ${it.descriptor}"
}
}
}