JVM KT-22465 don't generate accessor to private setter in other class
This commit is contained in:
@@ -925,6 +925,8 @@ public abstract class MemberCodegen<T extends KtPureElement/* TODO: & KtDeclarat
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (accessor.isVar() && accessor.isWithSyntheticSetterAccessor()) {
|
if (accessor.isVar() && accessor.isWithSyntheticSetterAccessor()) {
|
||||||
|
if (isProhibitedAccessorToPrivatePropertySetter(original)) return;
|
||||||
|
|
||||||
PropertySetterDescriptor setter = accessor.getSetter();
|
PropertySetterDescriptor setter = accessor.getSetter();
|
||||||
assert setter != null;
|
assert setter != null;
|
||||||
|
|
||||||
@@ -937,6 +939,20 @@ public abstract class MemberCodegen<T extends KtPureElement/* TODO: & KtDeclarat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isProhibitedAccessorToPrivatePropertySetter(PropertyDescriptor original) {
|
||||||
|
// Property setter might be less visible than the property itself.
|
||||||
|
// We can generate accessor for a private setter only if we are in the same class
|
||||||
|
// or in a class for the containing companion object (see KT-22465).
|
||||||
|
// NB we don't allow private or protected interface members in Kotlin (so far),
|
||||||
|
// so a property that might require an accessor can't be declared in an interface.
|
||||||
|
PropertyDescriptor overriddenProperty = DescriptorUtils.unwrapFakeOverride(original);
|
||||||
|
PropertySetterDescriptor overriddenSetter = overriddenProperty.getSetter();
|
||||||
|
if (overriddenSetter == null || !DescriptorVisibilities.isPrivate(overriddenSetter.getVisibility())) return false;
|
||||||
|
DeclarationDescriptor contextDescriptor = context.getContextDescriptor();
|
||||||
|
return contextDescriptor != overriddenProperty.getContainingDeclaration() &&
|
||||||
|
contextDescriptor != DescriptorUtils.getContainingClass(overriddenProperty);
|
||||||
|
}
|
||||||
|
|
||||||
protected StackValue generateMethodCallTo(
|
protected StackValue generateMethodCallTo(
|
||||||
@NotNull FunctionDescriptor functionDescriptor,
|
@NotNull FunctionDescriptor functionDescriptor,
|
||||||
@Nullable FunctionDescriptor accessorDescriptor,
|
@Nullable FunctionDescriptor accessorDescriptor,
|
||||||
|
|||||||
Generated
+20
@@ -20762,6 +20762,26 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
// FILE: accessorForProtectedPropertyWithPrivateSetter.kt
|
||||||
|
import a.A
|
||||||
|
|
||||||
|
class B : A() {
|
||||||
|
fun test() = { -> vo + fk()() }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = B().test()()
|
||||||
|
|
||||||
|
// FILE: a.kt
|
||||||
|
package a
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
protected var vo = "O"
|
||||||
|
private set
|
||||||
|
|
||||||
|
protected var vk = ""
|
||||||
|
private set
|
||||||
|
|
||||||
|
fun fk() = { ->
|
||||||
|
vk = "K"
|
||||||
|
vk
|
||||||
|
}
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
// FILE: accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt
|
||||||
|
import a.A
|
||||||
|
|
||||||
|
class B : A() {
|
||||||
|
fun test() = object {
|
||||||
|
override fun toString() = vo + fk()()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = B().test().toString()
|
||||||
|
|
||||||
|
// 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
+24
@@ -0,0 +1,24 @@
|
|||||||
|
// FILE: accessorForProtectedPropertyWithPrivateSetterViaSuper.kt
|
||||||
|
import a.A
|
||||||
|
|
||||||
|
class B : A() {
|
||||||
|
fun test() = { -> super.vo + fk()() }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = B().test()()
|
||||||
|
|
||||||
|
// FILE: a.kt
|
||||||
|
package a
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
protected var vo = "O"
|
||||||
|
private set
|
||||||
|
|
||||||
|
protected var vk = ""
|
||||||
|
private set
|
||||||
|
|
||||||
|
fun fk() = { ->
|
||||||
|
vk = "K"
|
||||||
|
vk
|
||||||
|
}
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
// FILE: accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt
|
||||||
|
import a.A
|
||||||
|
|
||||||
|
open class A2 : A()
|
||||||
|
|
||||||
|
class B : A2() {
|
||||||
|
fun test() = { -> vo + fk()() }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = B().test()()
|
||||||
|
|
||||||
|
// FILE: a.kt
|
||||||
|
package a
|
||||||
|
|
||||||
|
open class A {
|
||||||
|
protected var vo = "O"
|
||||||
|
private set
|
||||||
|
|
||||||
|
protected var vk = ""
|
||||||
|
private set
|
||||||
|
|
||||||
|
fun fk() = { ->
|
||||||
|
vk = "K"
|
||||||
|
vk
|
||||||
|
}
|
||||||
|
}
|
||||||
+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
|
||||||
|
}
|
||||||
+20
@@ -22533,6 +22533,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -25,6 +25,16 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
|||||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInBytecodeListing() throws Exception {
|
public void testAllFilesPresentInBytecodeListing() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-5
@@ -14799,11 +14799,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/anySuperCall.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/anySuperCall.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("fieldNameClash.kt")
|
|
||||||
public void ignoreFieldNameClash() throws Exception {
|
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/fieldNameClash.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inlineClassWithCustomEquals.kt")
|
@TestMetadata("inlineClassWithCustomEquals.kt")
|
||||||
public void ignoreInlineClassWithCustomEquals() throws Exception {
|
public void ignoreInlineClassWithCustomEquals() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassWithCustomEquals.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassWithCustomEquals.kt");
|
||||||
@@ -15107,6 +15102,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/inlineClasses/extLambdaInInlineClassFun2.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/extLambdaInInlineClassFun2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("fieldNameClash.kt")
|
||||||
|
public void testFieldNameClash() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/inlineClasses/fieldNameClash.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("genericInlineClassSynthMembers.kt")
|
@TestMetadata("genericInlineClassSynthMembers.kt")
|
||||||
public void testGenericInlineClassSynthMembers() throws Exception {
|
public void testGenericInlineClassSynthMembers() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/inlineClasses/genericInlineClassSynthMembers.kt");
|
runTest("compiler/testData/codegen/box/inlineClasses/genericInlineClassSynthMembers.kt");
|
||||||
@@ -22548,6 +22548,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+20
@@ -20762,6 +20762,26 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -25,6 +25,16 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
|||||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeListing/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInBytecodeListing() throws Exception {
|
public void testAllFilesPresentInBytecodeListing() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+20
@@ -17108,6 +17108,26 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+20
@@ -17108,6 +17108,26 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+20
@@ -17213,6 +17213,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetter.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetter() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterInObjectLiteral() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterInObjectLiteral.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterViaSuper.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterViaSuper() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterViaSuper.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt")
|
||||||
|
public void testAccessorForProtectedPropertyWithPrivateSetterWithIntermediateClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/properties/accessorForProtectedPropertyWithPrivateSetterWithIntermediateClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperties() throws Exception {
|
public void testAllFilesPresentInProperties() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user