From 544689dc4fd59ce6af6059444afcdaa3abb198e3 Mon Sep 17 00:00:00 2001 From: Morten Krogh-Jespersen Date: Fri, 26 Nov 2021 10:39:35 +0100 Subject: [PATCH] Add getter for syntheticMethodForDelegate in JvmExtensions --- .../jvm/src/kotlinx/metadata/jvm/jvmExtensions.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libraries/kotlinx-metadata/jvm/src/kotlinx/metadata/jvm/jvmExtensions.kt b/libraries/kotlinx-metadata/jvm/src/kotlinx/metadata/jvm/jvmExtensions.kt index b5f87ef8772..7198e7492b4 100644 --- a/libraries/kotlinx-metadata/jvm/src/kotlinx/metadata/jvm/jvmExtensions.kt +++ b/libraries/kotlinx-metadata/jvm/src/kotlinx/metadata/jvm/jvmExtensions.kt @@ -145,6 +145,19 @@ var KmProperty.syntheticMethodForAnnotations: JvmMethodSignature? jvm.syntheticMethodForAnnotations = value } +/** + * JVM signature of a synthetic method for properties which delegate to another property, + * which constructs and returns a property reference object. + * See https://kotlinlang.org/docs/delegated-properties.html#delegating-to-another-property. + * + * Example: `JvmMethodSignature("getX$delegate", "()Ljava/lang/Object;")`. + */ +var KmProperty.syntheticMethodForDelegate: JvmMethodSignature? + get() = jvm.syntheticMethodForDelegate + set(value) { + jvm.syntheticMethodForDelegate = value + } + /** * JVM signature of the constructor, or null if the JVM signature of this constructor is unknown. *