JVM Metadata: Add a bit to mark anonymous objects in inline functions
Anonymous objects in the scope of an inline functions are copied to all call-sites. This makes them part of the public ABI of a Kotlin library. We introduce a flag to mark all classes in the scope of an inline function. When compiling with assertions enabled, we check that this flag is set whenever we inline an anonymous object from another module.
This commit is contained in:
committed by
Alexander Udalov
parent
254fc53b17
commit
de9d2919a8
@@ -76,6 +76,8 @@ public annotation class Metadata(
|
||||
* * 5 - this class file has stable metadata and ABI. This is used only for class files compiled with JVM IR (see flag #4) or FIR (#6),
|
||||
* and prevents metadata incompatibility diagnostics from being reported where the class is used.
|
||||
* * 6 - this class file is compiled with the new Kotlin compiler frontend (FIR).
|
||||
* * 7 - this class is used in the scope of an inline function and implicitly part of the public ABI. Only valid from
|
||||
* metadata version 1.6.0.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@get:JvmName("xi")
|
||||
|
||||
Reference in New Issue
Block a user