JVM_IR never generate setter synthetic accessor for 'val' field

KT-49316
This commit is contained in:
Dmitry Petrov
2021-10-28 18:04:45 +03:00
committed by TeamCityServer
parent d7ae7ca911
commit 4f0c3c3c0d
12 changed files with 147 additions and 12 deletions
@@ -0,0 +1,17 @@
// 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"))