From f3dbf8f5d4785ac4cf314f926b8e5122c91891fd Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Tue, 20 Feb 2018 11:20:30 +0300 Subject: [PATCH] Don't use backing fields for properties generated from macros Thus don't require running initializer for these. --- .../jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt index c1f05aa836d..f5e30609094 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt @@ -776,7 +776,7 @@ class StubGenerator( // Also it provokes constant propagation which can reduce binary compatibility // when replacing interop stubs without recompiling the application. - out("val ${constant.name.asSimpleName()}: $kotlinType = $literal") + out("val ${constant.name.asSimpleName()}: $kotlinType get() = $literal") } private fun generateStubs(): List {