diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index e497fc168ee..c0d59b55731 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -3229,6 +3229,11 @@ task inline_defaultArgs(type: KonanLocalTest) { source = "codegen/inline/defaultArgs.kt" } +task inline_propertyAccessorInline(type: KonanLocalTest) { + goldValue = "123\n42\n" + source = "codegen/inline/propertyAccessorInline.kt" +} + task inline_twiceInlinedObject(type: KonanLocalTest) { goldValue = "Ok\n" source = "codegen/inline/twiceInlinedObject.kt" diff --git a/kotlin-native/backend.native/tests/codegen/inline/propertyAccessorInline.kt b/kotlin-native/backend.native/tests/codegen/inline/propertyAccessorInline.kt new file mode 100644 index 00000000000..49030854b19 --- /dev/null +++ b/kotlin-native/backend.native/tests/codegen/inline/propertyAccessorInline.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the LICENSE file. + */ + +package codegen.inline.propertyAccessorInline + +import kotlin.test.* + +object C { + const val x = 42 +} + +fun getC(): C { + println(123) + return C +} + +@Test fun runTest() { + println(getC().x) +} +