[FIR2IR] Include generated IR fields into Fir2IrCommonMemberStorage

In case of HMPP structure with common JVM module (e.g. shared between
  JVM and Android) one can reference the same field from java code,
  so it should be shared between fir2ir sessions

^KT-63574 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-12-07 14:06:59 +02:00
committed by Space Team
parent 701a48b211
commit 58678c09e8
11 changed files with 73 additions and 1 deletions
@@ -0,0 +1,23 @@
// TARGET_BACKEND: JVM_IR
// LANGUAGE: +MultiPlatformProjects
// FULL_JDK
// ISSUE: KT-63574
// MODULE: commonJvm
// FILE: common.kt
import java.nio.ByteOrder
fun foo(): String = ByteOrder.LITTLE_ENDIAN.toString()
// MODULE: platformJvm()()(commonJvm)
// FILE: platform.kt
import java.nio.ByteOrder
fun bar(): String = ByteOrder.LITTLE_ENDIAN.toString()
fun box(): String {
val expected = "LITTLE_ENDIAN"
if (foo() != expected) return "Fail 1"
if (bar() != expected) return "Fail 2"
return "OK"
}