JVM_IR: further refine synthetic accessor generation
References to protected members from crossinline lambdas in the same package do not need accessors.
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
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
|
||||
Reference in New Issue
Block a user