JVM KT-22465 don't generate accessor to private setter in other class
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// FILE: accessorForProtectedPropertyWithPrivateSetter.kt
|
||||
import a.A
|
||||
|
||||
class B : A() {
|
||||
fun test() = { -> vo + fk()() }
|
||||
}
|
||||
|
||||
// FILE: a.kt
|
||||
package a
|
||||
|
||||
open class A {
|
||||
protected var vo = "O"
|
||||
private set
|
||||
|
||||
protected var vk = ""
|
||||
private set
|
||||
|
||||
fun fk() = { ->
|
||||
vk = "K"
|
||||
vk
|
||||
}
|
||||
}
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
@kotlin.Metadata
|
||||
final class B$test$1 {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetter.kt'
|
||||
enclosing method B.test()Lkotlin/jvm/functions/Function0;
|
||||
synthetic final field this$0: B
|
||||
inner (anonymous) class B$test$1
|
||||
method <init>(p0: B): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetter.kt'
|
||||
inner (anonymous) class B$test$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getVo$p(p0: B): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method test(): kotlin.jvm.functions.Function0
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class a/A$fk$1 {
|
||||
// source: 'a.kt'
|
||||
enclosing method a/A.fk()Lkotlin/jvm/functions/Function0;
|
||||
synthetic final field this$0: a.A
|
||||
inner (anonymous) class a/A$fk$1
|
||||
method <init>(p0: a.A): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class a/A {
|
||||
// source: 'a.kt'
|
||||
private @org.jetbrains.annotations.NotNull field vk: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field vo: java.lang.String
|
||||
inner (anonymous) class a/A$fk$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getVk$p(p0: a.A): java.lang.String
|
||||
public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void
|
||||
public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0
|
||||
protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String
|
||||
protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt
|
||||
import a.A
|
||||
|
||||
class B : A() {
|
||||
fun test() = object {
|
||||
override fun toString() = vo + fk()()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: a.kt
|
||||
package a
|
||||
|
||||
open class A {
|
||||
protected var vo = "O"
|
||||
private set
|
||||
|
||||
protected var vk = ""
|
||||
private set
|
||||
|
||||
fun fk() = { ->
|
||||
vk = "K"
|
||||
vk
|
||||
}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
@kotlin.Metadata
|
||||
public final class B$test$1 {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt'
|
||||
enclosing method B.test()Ljava/lang/Object;
|
||||
synthetic final field this$0: B
|
||||
inner (anonymous) class B$test$1
|
||||
method <init>(p0: B): void
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt'
|
||||
inner (anonymous) class B$test$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getVo$p(p0: B): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method test(): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class a/A$fk$1 {
|
||||
// source: 'a.kt'
|
||||
enclosing method a/A.fk()Lkotlin/jvm/functions/Function0;
|
||||
synthetic final field this$0: a.A
|
||||
inner (anonymous) class a/A$fk$1
|
||||
method <init>(p0: a.A): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class a/A {
|
||||
// source: 'a.kt'
|
||||
private @org.jetbrains.annotations.NotNull field vk: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field vo: java.lang.String
|
||||
inner (anonymous) class a/A$fk$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getVk$p(p0: a.A): java.lang.String
|
||||
public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void
|
||||
public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0
|
||||
protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String
|
||||
protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
@kotlin.Metadata
|
||||
public final class B$test$1 {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt'
|
||||
enclosing method B.test()Ljava/lang/Object;
|
||||
synthetic final field this$0: B
|
||||
inner (anonymous) class B$test$1
|
||||
method <init>(p0: B): void
|
||||
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt'
|
||||
inner (anonymous) class B$test$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getVo(p0: B): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method test(): java.lang.Object
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class a/A$fk$1 {
|
||||
// source: 'a.kt'
|
||||
enclosing method a/A.fk()Lkotlin/jvm/functions/Function0;
|
||||
synthetic final field this$0: a.A
|
||||
inner (anonymous) class a/A$fk$1
|
||||
method <init>(p0: a.A): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class a/A {
|
||||
// source: 'a.kt'
|
||||
private @org.jetbrains.annotations.NotNull field vk: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field vo: java.lang.String
|
||||
inner (anonymous) class a/A$fk$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void
|
||||
public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0
|
||||
protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String
|
||||
protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String
|
||||
}
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
@kotlin.Metadata
|
||||
final class B$test$1 {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetter.kt'
|
||||
enclosing method B.test()Lkotlin/jvm/functions/Function0;
|
||||
synthetic final field this$0: B
|
||||
inner (anonymous) class B$test$1
|
||||
method <init>(p0: B): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class B {
|
||||
// source: 'accessorForProtectedPropertyWithPrivateSetter.kt'
|
||||
inner (anonymous) class B$test$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$getVo(p0: B): java.lang.String
|
||||
public final @org.jetbrains.annotations.NotNull method test(): kotlin.jvm.functions.Function0
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class a/A$fk$1 {
|
||||
// source: 'a.kt'
|
||||
enclosing method a/A.fk()Lkotlin/jvm/functions/Function0;
|
||||
synthetic final field this$0: a.A
|
||||
inner (anonymous) class a/A$fk$1
|
||||
method <init>(p0: a.A): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public class a/A {
|
||||
// source: 'a.kt'
|
||||
private @org.jetbrains.annotations.NotNull field vk: java.lang.String
|
||||
private @org.jetbrains.annotations.NotNull field vo: java.lang.String
|
||||
inner (anonymous) class a/A$fk$1
|
||||
public method <init>(): void
|
||||
public synthetic final static method access$setVk$p(p0: a.A, p1: java.lang.String): void
|
||||
public final @org.jetbrains.annotations.NotNull method fk(): kotlin.jvm.functions.Function0
|
||||
protected final @org.jetbrains.annotations.NotNull method getVk(): java.lang.String
|
||||
protected final @org.jetbrains.annotations.NotNull method getVo(): java.lang.String
|
||||
}
|
||||
Reference in New Issue
Block a user