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:
+19
@@ -0,0 +1,19 @@
|
||||
// FILE: protectedPack/J.java
|
||||
|
||||
package protectedPack;
|
||||
|
||||
public class J {
|
||||
protected String foo = "OK";
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
package protectedPack
|
||||
|
||||
inline fun foo(crossinline bar: () -> String) = object {
|
||||
fun baz() = bar()
|
||||
}.baz()
|
||||
|
||||
fun box(): String {
|
||||
return foo { J().foo!! }
|
||||
}
|
||||
Reference in New Issue
Block a user