Native, K1: add ExperimentalForeignApi to generated forward declarations

cinterop tool should add ExperimentalForeignApi to all generated
declarations, to indicate their experimental status and discourage using
them in public Kotlin API. But the same considerations are applicable
to forward declarations (cnames.*, objcnames.*), which are generated not
by cinterop tool, but directly by the compiler.

This commit adds ExperimentalForeignApi to those compiler-generated
classes.

^KT-58362
This commit is contained in:
Svyatoslav Scherbina
2023-07-14 12:36:47 +02:00
committed by Space Team
parent d6ba233bbe
commit cba955cb3e
2 changed files with 20 additions and 4 deletions
@@ -12,6 +12,7 @@ object NativeStandardInteropNames {
internal val CStructVar = Name.identifier("CStructVar")
internal val ObjCObjectBase = Name.identifier("ObjCObjectBase")
internal val ObjCObject = Name.identifier("ObjCObject")
val ExperimentalForeignApi = Name.identifier("ExperimentalForeignApi")
object ForwardDeclarations {
private val cNamesPackage = FqName("cnames")