Files
kotlin-fork/compiler/testData/codegen/box/properties/const/constPropertyAccessor.kt
T
2023-01-17 18:14:17 +00:00

22 lines
270 B
Kotlin
Vendored

// IGNORE_BACKEND: JS
var a = 12
object C {
const val x = 42
}
fun getC(): C {
a = 123
return C
}
fun box(): String {
val field = getC().x
val expectedResult = 123
if (a == expectedResult)
return "OK"
else
return "FAIL"
}