Files
kotlin/compiler/testData/codegen/bytecodeText/noAccessorForProtectedInSamePackageCrossinline.kt
pyos bda5b0d5a9 JVM_IR: further refine synthetic accessor generation
References to protected members from crossinline lambdas in the same
package do not need accessors.
2020-01-31 13:20:30 +01:00

18 lines
294 B
Kotlin
Vendored

package a
open class A {
protected fun protectedFun(): String = "OK"
}
inline fun foo(crossinline bar: () -> String) = object {
fun baz() = bar()
}.baz()
class BSamePackage: A() {
fun test(): String = foo {
protectedFun()
}
}
// 0 INVOKESTATIC a/BSamePackage.access