Don't refer self function in Fir2IrLazySimpleFunction.initialSignature

This commit prevents stack overflow in MethodSignatureMapper
#KT-49222 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-10-13 16:15:04 +03:00
committed by TeamCityServer
parent 31db76da56
commit ad3502a952
2 changed files with 1 additions and 2 deletions
@@ -86,7 +86,7 @@ class Fir2IrLazySimpleFunction(
}
override val initialSignatureFunction: IrFunction? by lazy {
(fir.initialSignatureAttr as? FirFunction)?.symbol?.let { declarationStorage.getIrFunctionSymbol(it).owner }
(fir.initialSignatureAttr as? FirFunction)?.symbol?.let { declarationStorage.getIrFunctionSymbol(it).owner }?.takeIf { it !== this }
}
override val containerSource: DeserializedContainerSource?
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// WITH_RUNTIME