Added tests for KT-29833
This commit is contained in:
@@ -236,6 +236,15 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() {
|
||||
private fun IrSymbol.checkBinding(kind: String, irElement: IrElement) {
|
||||
if (!isBound) {
|
||||
error("${javaClass.simpleName} $descriptor is unbound @$kind ${irElement.render()}")
|
||||
} else {
|
||||
val irDeclaration = owner as? IrDeclaration
|
||||
if (irDeclaration != null) {
|
||||
try {
|
||||
irDeclaration.parent
|
||||
} catch (e: Throwable) {
|
||||
error("Referenced declaration has no parent: ${irDeclaration.render()}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val otherSymbol = symbolForDeclaration.getOrPut(owner) { this }
|
||||
|
||||
Reference in New Issue
Block a user