Files
kotlin-fork/compiler/testData/codegen/bytecodeText/companion/privateCompanionObjectAccessors_after.kt
T
Kristoffer Andersen f782ea075b [JVM IR] ProperVisibilityForCompanionObjectInstanceField
- Uncomment tests
- Add proper visibility to companion field
  + Make exception for interfaces -> they need to respect language versions 1.8
    before they can put private members there.
- Adjust synthetic accessor lowering to look for enclosing classes with access
  via companion object.
2020-02-13 21:50:48 +03:00

11 lines
190 B
Kotlin
Vendored

// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
class Host {
private companion object {
fun foo() = 1
}
fun test() = { foo() }
}
// 1 synthetic access\$