f782ea075b
- 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.
20 lines
294 B
Kotlin
Vendored
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\$ |