FE: add test for KT-53908

This commit is contained in:
Mikhail Glukhikh
2022-09-15 17:07:18 +02:00
committed by Space
parent 73e7053c35
commit 6ab516a7e5
8 changed files with 61 additions and 0 deletions
@@ -34593,6 +34593,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt");
}
@Test
@TestMetadata("genericContainer.kt")
public void testGenericContainer() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/genericContainer.kt");
}
@Test
@TestMetadata("greater.kt")
public void testGreater() throws Exception {
@@ -34593,6 +34593,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt");
}
@Test
@TestMetadata("genericContainer.kt")
public void testGenericContainer() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/genericContainer.kt");
}
@Test
@TestMetadata("greater.kt")
public void testGreater() throws Exception {
@@ -34593,6 +34593,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt");
}
@Test
@TestMetadata("genericContainer.kt")
public void testGenericContainer() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/genericContainer.kt");
}
@Test
@TestMetadata("greater.kt")
public void testGreater() throws Exception {
@@ -0,0 +1,12 @@
// FIR_DUMP
// FILE: GenericContainer.java
public class GenericContainer<SELF extends GenericContainer<SELF>> {
public GenericContainer(String dockerImageName) {
}
}
// FILE: test.kt
val container = <!NEW_INFERENCE_ERROR!>GenericContainer("nginx")<!>
@@ -0,0 +1,3 @@
FILE: test.kt
public final val container: R|GenericContainer<out ft<GenericContainer<*>, GenericContainer<*>?>>| = <CS errors: /GenericContainer.GenericContainer>#<R|CapturedType(*)|>(String(nginx))
public get(): R|GenericContainer<out ft<GenericContainer<*>, GenericContainer<*>?>>|
@@ -0,0 +1,12 @@
// FIR_DUMP
// FILE: GenericContainer.java
public class GenericContainer<SELF extends GenericContainer<SELF>> {
public GenericContainer(String dockerImageName) {
}
}
// FILE: test.kt
val container = GenericContainer("nginx")
@@ -0,0 +1,10 @@
package
public val container: GenericContainer<out GenericContainer<*>!>
public open class GenericContainer</*0*/ SELF : GenericContainer<SELF!>!> {
public constructor GenericContainer</*0*/ SELF : GenericContainer<SELF!>!>(/*0*/ dockerImageName: kotlin.String!)
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -34683,6 +34683,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/testsWithStdLib/exitProcess.kt");
}
@Test
@TestMetadata("genericContainer.kt")
public void testGenericContainer() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/genericContainer.kt");
}
@Test
@TestMetadata("greater.kt")
public void testGreater() throws Exception {