Files
kotlin-fork/compiler/testData/codegen/box/jvmField/captureClassFields.kt
T
2018-08-09 14:22:50 +03:00

23 lines
509 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
open class A {
@JvmField public val publicField = "1";
@JvmField internal val internalField = "2";
@JvmField protected val protectedField = "34";
fun test(): String {
return {
publicField + internalField + protectedField
}()
}
}
fun box(): String {
return if (A().test() == "1234") return "OK" else "fail"
}