JVM: Don't generate accessors to companions in earlier language versions

This commit is contained in:
Dmitry Petrov
2020-01-13 23:37:53 +03:00
parent 6ad159bb01
commit a16b21a7cc
5 changed files with 49 additions and 1 deletions
@@ -0,0 +1,13 @@
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
// IGNORE_BACKEND: JVM_IR
// ^ TODO implement ProperVisibilityForCompanionObjectInstanceField feature support in JMV_IR
class Host {
private companion object {
fun foo() = 1
}
fun test() = { foo() }
}
// 1 synthetic access\$
@@ -0,0 +1,11 @@
// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField
class Host {
private companion object {
fun foo() = 1
}
fun test() = { foo() }
}
// 0 synthetic access\$