IR: Fix error rendering on IR symbol binding conflict

it could be called with uninitialized `owner` parameter, leading
to the NPE on render
This commit is contained in:
Ilya Chernikov
2021-06-10 11:41:09 +02:00
committed by TeamCityServer
parent dee0487185
commit 3b2bb2ba9f
2 changed files with 2 additions and 2 deletions
@@ -61,7 +61,7 @@ abstract class IrBindableSymbolBase<out D : DeclarationDescriptor, B : IrSymbolO
if (_owner == null) {
_owner = owner
} else {
throw IllegalStateException("${javaClass.simpleName} is already bound: ${owner.render()}")
throw IllegalStateException("${javaClass.simpleName} is already bound: ${_owner?.render()}")
}
}
@@ -55,7 +55,7 @@ abstract class IrBindablePublicSymbolBase<out D : DeclarationDescriptor, B : IrS
if (_owner == null) {
_owner = owner
} else {
throw IllegalStateException("${javaClass.simpleName} for $signature is already bound: ${owner.render()}")
throw IllegalStateException("${javaClass.simpleName} for $signature is already bound: ${_owner?.render()}")
}
}