Files
kotlin-fork/compiler/testData/codegen/bytecodeText/companion/protectedCompanionObjectAccessors_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

20 lines
294 B
Kotlin
Vendored

// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
// FILE: Base.kt
package a
open class Base {
protected companion object {
fun foo() = 1
}
}
// FILE: Host.kt
import a.*
class Host : Base() {
fun test() = { foo() }
}
// @Host.class:
// 1 synthetic access\$