[FIR] Handle expect declarations in JVM backend

1. Do not generate bytecode for expect declarations

2. Serialize @OptionalExpectation annotations into .kotlin_module file

^KT-62931: Fixed
This commit is contained in:
vladislav.grechko
2024-02-08 18:01:11 +01:00
committed by Space Team
parent b74501ee93
commit d753a22fc6
24 changed files with 352 additions and 113 deletions
@@ -0,0 +1,9 @@
MODULE main
CLASS Foo.class
CLASS METADATA
PROPERTY getX()I
Property: class.metadata.property.setterValueParameter
K1
<set-?>: kotlin/Int
K2
value: kotlin/Int
@@ -2,9 +2,8 @@
// !OPT_IN: kotlin.ExperimentalMultiplatform
// TARGET_BACKEND: JVM
// WITH_STDLIB
// JVM_ABI_K1_K2_DIFF: KT-63984
// IGNORE_BACKEND_K2: JVM_IR
// FIR status: K2 incorrectly generates Anno.class, need to investigate after KT-57243 is fixed.
@file:Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE") // TODO: support common sources in the test infrastructure