Value classes: Generate @JvmInline annotation for inline classes

but not for value classes.
Since inline classes and value classes share the same flag, we use
presence of the annotation to distinguish them.
This commit is contained in:
Ilmir Usmanov
2020-11-19 22:00:27 +01:00
parent ae8abd1832
commit 129de76288
103 changed files with 1213 additions and 1056 deletions
@@ -13,7 +13,7 @@ import org.jetbrains.kotlin.types.TypeUtils
import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
val JVM_INLINE_ANNOTATION_FQ_NAME = FqName("kotlin.JvmInline")
val JVM_INLINE_ANNOTATION_FQ_NAME = FqName("kotlin.jvm.JvmInline")
fun ClassDescriptor.underlyingRepresentation(): ValueParameterDescriptor? {
if (!isInlineClass()) return null