Minor, add regression test for K1 issue KT-61101

This commit is contained in:
Alexander Udalov
2023-11-09 11:46:40 +01:00
committed by Space Team
parent 37b839f2c2
commit e0b2f2040b
7 changed files with 56 additions and 0 deletions
@@ -28548,6 +28548,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/properties/localPropertyExtensions.kt");
}
@Test
@TestMetadata("PrivateSetInSuperclass.kt")
public void testPrivateSetInSuperclass() throws Exception {
runTest("compiler/testData/diagnostics/tests/properties/PrivateSetInSuperclass.kt");
}
@Test
@TestMetadata("protectedGetterWithPublicSetter.kt")
public void testProtectedGetterWithPublicSetter() throws Exception {
@@ -28548,6 +28548,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/properties/localPropertyExtensions.kt");
}
@Test
@TestMetadata("PrivateSetInSuperclass.kt")
public void testPrivateSetInSuperclass() throws Exception {
runTest("compiler/testData/diagnostics/tests/properties/PrivateSetInSuperclass.kt");
}
@Test
@TestMetadata("protectedGetterWithPublicSetter.kt")
public void testProtectedGetterWithPublicSetter() throws Exception {
@@ -26548,6 +26548,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/properties/localPropertyExtensions.kt");
}
@Test
@TestMetadata("PrivateSetInSuperclass.kt")
public void testPrivateSetInSuperclass() throws Exception {
runTest("compiler/testData/diagnostics/tests/properties/PrivateSetInSuperclass.kt");
}
@Test
@TestMetadata("protectedGetterWithPublicSetter.kt")
public void testProtectedGetterWithPublicSetter() throws Exception {
@@ -26554,6 +26554,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/properties/localPropertyExtensions.kt");
}
@Test
@TestMetadata("PrivateSetInSuperclass.kt")
public void testPrivateSetInSuperclass() throws Exception {
runTest("compiler/testData/diagnostics/tests/properties/PrivateSetInSuperclass.kt");
}
@Test
@TestMetadata("protectedGetterWithPublicSetter.kt")
public void testProtectedGetterWithPublicSetter() throws Exception {
@@ -0,0 +1,13 @@
// ISSUE: KT-61101
open class A {
var x: Int = 0
private set
}
class B : A()
fun test() {
val b = B()
b.<!INVISIBLE_SETTER!>x<!> = throw Exception()
}
@@ -0,0 +1,13 @@
// ISSUE: KT-61101
open class A {
var x: Int = 0
private set
}
class B : A()
fun test() {
val b = B()
b<!UNREACHABLE_CODE!>.x =<!> throw Exception()
}
@@ -28548,6 +28548,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/properties/localPropertyExtensions.kt");
}
@Test
@TestMetadata("PrivateSetInSuperclass.kt")
public void testPrivateSetInSuperclass() throws Exception {
runTest("compiler/testData/diagnostics/tests/properties/PrivateSetInSuperclass.kt");
}
@Test
@TestMetadata("protectedGetterWithPublicSetter.kt")
public void testProtectedGetterWithPublicSetter() throws Exception {