Files
kotlin-fork/compiler/testData/codegen/box/package/kt62017.kt
T
Alexander Udalov 5cae87b263 K2: add package FQ name to ClassId of anonymous objects
This is needed because in order to figure out which declarations are
visible from anonymous objects in terms of overridability (see
`FirVisibilityChecker.isVisibleForOverriding`), we need to get the
package name of that anonymous object, because there's package-private
visibility on JVM.

 #KT-62017 Fixed
2023-09-19 09:32:55 +00:00

21 lines
293 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: a/A.java
package a;
abstract class A<T> {
String o() { return "O"; }
String k() { return "K"; }
}
// FILE: a/1.kt
package a
private val o = object : A<String>() {}
fun box(): String {
val k = object : A<String>() {}
return o.o() + k.k()
}