[FIR2IR] Use signature instead of FIR as a key for fake-override storage

This is needed to correctly handle the case, when we have the same java
  class in common and platform module. In this scenario we have two
  different classes on frontend (because symbol providers are not shared)
  and completely different enhanced function in scopes of those classes,
  but exactly one IrClass for those classes, which is cached during
  conversion of common module together with cache of its fake overrides.
  So using FirDeclaration as a key to FO cache leads to the problem, when
  we can not find cached value for platform module, because it has different
  fir declarations for the same real decalration

^KT-58030 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-04-24 18:28:50 +03:00
committed by Space Team
parent 7b46c59d57
commit 15dfe6c750
7 changed files with 73 additions and 5 deletions
@@ -0,0 +1,26 @@
// LANGUAGE: +MultiPlatformProjects
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// Ignore reason: expect/actual are not supported in K1 box tests
// ISSUE: KT-58030
// MODULE: common
// FILE: common.kt
expect open class CancellationException: Exception
expect class JobCancellationException: CancellationException
// MODULE: jvm()()(common)
// FILE: jvm.kt
actual open class CancellationException: Exception()
actual class JobCancellationException: CancellationException() {
init {
super.fillInStackTrace()
}
}
fun box() = "OK"