Add Flag.IS_VALUE for value classes to kotlinx-metadata-jvm

#KT-44783 Fixed
This commit is contained in:
Alexander Udalov
2021-03-05 20:28:33 +01:00
parent 6ddca4a592
commit ee11202db5
8 changed files with 52 additions and 6 deletions
+3 -1
View File
@@ -2,7 +2,9 @@
## 0.2.1
- Deprecate `KotlinClassHeader.bytecodeVersion` and `KotlinClassHeader`'s constructor that takes a bytecode version array.
- [KT-44783](https://youtrack.jetbrains.com/issue/KT-44783) Add Flag.IS_VALUE for value classes
- Breaking change: `Flag.IS_INLINE` is deprecated, use `Flag.IS_VALUE` instead
- Breaking change: deprecate `KotlinClassHeader.bytecodeVersion` and `KotlinClassHeader`'s constructor that takes a bytecode version array.
Related to ['KT-41758`](https://youtrack.jetbrains.com/issue/KT-41758).
## 0.2.0
@@ -202,11 +202,19 @@ class Flag(private val offset: Int, private val bitWidth: Int, private val value
@JvmField
val IS_EXPECT = Flag(F.IS_EXPECT_CLASS)
@JvmField
@Deprecated(
"Use IS_VALUE instead, which returns true if the class is either a pre-1.5 inline class, or a 1.5+ value class.",
level = DeprecationLevel.ERROR
)
@Suppress("unused")
val IS_INLINE = Flag(F.IS_INLINE_CLASS)
/**
* Signifies that the corresponding class is `inline`.
* Signifies that the corresponding class is either a pre-Kotlin-1.5 `inline` class, or a 1.5+ `value` class.
*/
@JvmField
val IS_INLINE = Flag(F.IS_INLINE_CLASS)
val IS_VALUE = Flag(F.IS_INLINE_CLASS)
/**
* Signifies that the corresponding class is a functional interface, i.e. marked with the keyword `fun`.