Files
kotlin-fork/compiler/testData/codegen/box/syntheticAccessors/packagePrivateInPrivateInline.kt
T
pyos d07070e184 JVM_IR: avoid redundant accessors in private inline funs
Their call sites are all in the same file, so we can check whether the
declarations used in the inline function are accessible from all the
places where it will be inlined.

 #KT-48736 Fixed
2021-09-14 22:17:10 +02:00

19 lines
353 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: test/J.java
package test;
public class J {
String packagePrivate = "OK";
}
// FILE: test/main.kt
package test
object O {
fun box() = privateInline()
// no accessor needed - the only call site is in the same package
private inline fun privateInline(): String = J().packagePrivate
}
fun box() = O.box()