[Test] Ensure FIR doesn't fail on recursive private-to-this case
^KT-55446
This commit is contained in:
committed by
Space Team
parent
c64575f4a2
commit
b87aa470dd
+6
@@ -40952,6 +40952,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisK1Crash.kt")
|
||||||
|
public void testPrivateToThisK1Crash() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisK1Crash.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
+6
@@ -40952,6 +40952,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisK1Crash.kt")
|
||||||
|
public void testPrivateToThisK1Crash() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisK1Crash.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
+6
@@ -38578,6 +38578,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisK1Crash.kt")
|
||||||
|
public void testPrivateToThisK1Crash() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisK1Crash.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
+6
@@ -38704,6 +38704,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisK1Crash.kt")
|
||||||
|
public void testPrivateToThisK1Crash() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisK1Crash.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
org.jetbrains.kotlin.util.ReenteringLazyValueComputationException
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// ISSUE: KT-55446
|
||||||
|
val Any?.tt: String
|
||||||
|
get() = ""
|
||||||
|
|
||||||
|
open class Base<in T>(t: T) {
|
||||||
|
private val tt = t.also { foo(null!!) }
|
||||||
|
|
||||||
|
fun foo(a: Derived<String>) = run {
|
||||||
|
val x: String = a.tt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Derived<in T>(t: T) : Base<T>(t)
|
||||||
Generated
+6
@@ -40952,6 +40952,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisExotic.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("privateToThisK1Crash.kt")
|
||||||
|
public void testPrivateToThisK1Crash() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/visibility/privateToThisK1Crash.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("protectedInternal.kt")
|
@TestMetadata("protectedInternal.kt")
|
||||||
public void testProtectedInternal() throws Exception {
|
public void testProtectedInternal() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user