Files
kotlin-fork/kotlin-native/backend.native/tests/codegen/inline/propertyAccessorInline.kt
T
LepilkinaElena 55cb50e15b Added test for inlining accessors of const properties (#4589)
(cherry picked from commit fa4cd091ae9160b97d79bd318cc92f76ada82fec)
2020-12-14 15:31:10 +01:00

23 lines
352 B
Kotlin

/*
* 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)
}