Files
kotlin-fork/compiler/testData/codegen/box/syntheticAccessors/kt49316a.kt
T
2021-10-29 18:38:11 +03:00

18 lines
409 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// This test should become irrelevant after KT-35565 is fixed.
fun test(foo: Foo): String {
return foo.s
// VAL_REASSIGNMENT not reported in unreachable code.
// Make sure there's no BE internal error here.
foo.s = "oops"
}
// CHECK_BYTECODE_LISTING
// - there should be no synthetic accessor generated in 'Foo'
class Foo(val s: String)
fun box() = test(Foo("OK"))