K2: reproduce KT-61459
This commit is contained in:
committed by
Space Team
parent
310e89f100
commit
92470484bf
+6
@@ -18173,6 +18173,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nestedClassesWithSelfTypes.kt")
|
||||||
|
public void testNestedClassesWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/nestedClassesWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursiveInIn.kt")
|
@TestMetadata("recursiveInIn.kt")
|
||||||
public void testRecursiveInIn() throws Exception {
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
|||||||
+6
@@ -18173,6 +18173,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nestedClassesWithSelfTypes.kt")
|
||||||
|
public void testNestedClassesWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/nestedClassesWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursiveInIn.kt")
|
@TestMetadata("recursiveInIn.kt")
|
||||||
public void testRecursiveInIn() throws Exception {
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
|||||||
+6
@@ -18173,6 +18173,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nestedClassesWithSelfTypes.kt")
|
||||||
|
public void testNestedClassesWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/nestedClassesWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursiveInIn.kt")
|
@TestMetadata("recursiveInIn.kt")
|
||||||
public void testRecursiveInIn() throws Exception {
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
|||||||
+6
@@ -18179,6 +18179,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nestedClassesWithSelfTypes.kt")
|
||||||
|
public void testNestedClassesWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/nestedClassesWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursiveInIn.kt")
|
@TestMetadata("recursiveInIn.kt")
|
||||||
public void testRecursiveInIn() throws Exception {
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
|||||||
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// ISSUE: KT-61459
|
||||||
|
|
||||||
|
interface Alarm {
|
||||||
|
interface Builder<Self : Builder<Self>> {
|
||||||
|
fun build(): Alarm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class AbstractAlarm<Self : AbstractAlarm<Self, Builder>, Builder : AbstractAlarm.Builder<Builder, Self>>(
|
||||||
|
val identifier: String,
|
||||||
|
) : Alarm {
|
||||||
|
abstract class Builder<Self : Builder<!TYPE_ARGUMENTS_NOT_ALLOWED!><Self, Built><!>, Built : AbstractAlarm<Built, <!UPPER_BOUND_VIOLATED!>Self<!>>> : Alarm.Builder<<!UPPER_BOUND_VIOLATED!>Self<!>> {
|
||||||
|
private var identifier: String = ""
|
||||||
|
|
||||||
|
fun setIdentifier(text: String): Self {
|
||||||
|
this.identifier = text
|
||||||
|
return this <!UNCHECKED_CAST!>as Self<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
final override fun build(): Built = TODO()
|
||||||
|
}
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// ISSUE: KT-61459
|
||||||
|
|
||||||
|
interface Alarm {
|
||||||
|
interface Builder<Self : Builder<Self>> {
|
||||||
|
fun build(): Alarm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class AbstractAlarm<Self : AbstractAlarm<Self, Builder>, Builder : AbstractAlarm.Builder<Builder, Self>>(
|
||||||
|
val identifier: String,
|
||||||
|
) : Alarm {
|
||||||
|
abstract class Builder<Self : Builder<Self, Built>, Built : AbstractAlarm<Built, Self>> : Alarm.Builder<Self> {
|
||||||
|
private var identifier: String = ""
|
||||||
|
|
||||||
|
fun setIdentifier(text: String): Self {
|
||||||
|
this.identifier = text
|
||||||
|
return this <!UNCHECKED_CAST!>as Self<!>
|
||||||
|
}
|
||||||
|
|
||||||
|
final override fun build(): Built = TODO()
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+6
@@ -18179,6 +18179,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/multirecursion.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nestedClassesWithSelfTypes.kt")
|
||||||
|
public void testNestedClassesWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/nestedClassesWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursiveInIn.kt")
|
@TestMetadata("recursiveInIn.kt")
|
||||||
public void testRecursiveInIn() throws Exception {
|
public void testRecursiveInIn() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user