K2: Add test data for KT-64841 showing its current state
This commit is contained in:
committed by
Space Team
parent
3024ec3da3
commit
81d559ad7f
+12
@@ -21380,6 +21380,18 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypes.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypesInitial.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypesInitial() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypesInitial.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("classesInClassObjectHeader.kt")
|
@TestMetadata("classesInClassObjectHeader.kt")
|
||||||
public void testClassesInClassObjectHeader() throws Exception {
|
public void testClassesInClassObjectHeader() throws Exception {
|
||||||
|
|||||||
+12
@@ -21380,6 +21380,18 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypes.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypesInitial.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypesInitial() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypesInitial.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("classesInClassObjectHeader.kt")
|
@TestMetadata("classesInClassObjectHeader.kt")
|
||||||
public void testClassesInClassObjectHeader() throws Exception {
|
public void testClassesInClassObjectHeader() throws Exception {
|
||||||
|
|||||||
+12
@@ -21374,6 +21374,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypes.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypesInitial.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypesInitial() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypesInitial.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("classesInClassObjectHeader.kt")
|
@TestMetadata("classesInClassObjectHeader.kt")
|
||||||
public void testClassesInClassObjectHeader() throws Exception {
|
public void testClassesInClassObjectHeader() throws Exception {
|
||||||
|
|||||||
+12
@@ -21380,6 +21380,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypes.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypesInitial.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypesInitial() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypesInitial.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("classesInClassObjectHeader.kt")
|
@TestMetadata("classesInClassObjectHeader.kt")
|
||||||
public void testClassesInClassObjectHeader() throws Exception {
|
public void testClassesInClassObjectHeader() throws Exception {
|
||||||
|
|||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
// ISSUE: KT-64841
|
||||||
|
|
||||||
|
open class A<X : A<X>>(a: Any?) {
|
||||||
|
// Constraints while resolving super constructor call
|
||||||
|
//
|
||||||
|
// The signature of constructor comes substituted
|
||||||
|
// constructor<X : R|A<A.B<X>>|>(a: R|kotlin/Any?|): R|A<A.B<X>>|
|
||||||
|
//
|
||||||
|
// Xv <: A<A<Xv>.B> (from type parameter bounds, actually it's the incorrect place)
|
||||||
|
//
|
||||||
|
// Xv := A<X>.B (from explicit type argument of constructor call)
|
||||||
|
// A<X>.B> <: A<A<Xv>.B>
|
||||||
|
// A<A<X>.B> <: A<A<Xv>.B>
|
||||||
|
// Xv := X
|
||||||
|
// X != A<X>.B -> FAIL
|
||||||
|
inner class B : A<B>(<!ARGUMENT_TYPE_MISMATCH!>""<!>) {
|
||||||
|
fun foo() {
|
||||||
|
A<B>("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
// ISSUE: KT-64841
|
||||||
|
|
||||||
|
open class A<X : A<X>>(a: Any?) {
|
||||||
|
// Constraints while resolving super constructor call
|
||||||
|
//
|
||||||
|
// The signature of constructor comes substituted
|
||||||
|
// constructor<X : R|A<A.B<X>>|>(a: R|kotlin/Any?|): R|A<A.B<X>>|
|
||||||
|
//
|
||||||
|
// Xv <: A<A<Xv>.B> (from type parameter bounds, actually it's the incorrect place)
|
||||||
|
//
|
||||||
|
// Xv := A<X>.B (from explicit type argument of constructor call)
|
||||||
|
// A<X>.B> <: A<A<Xv>.B>
|
||||||
|
// A<A<X>.B> <: A<A<Xv>.B>
|
||||||
|
// Xv := X
|
||||||
|
// X != A<X>.B -> FAIL
|
||||||
|
inner class B : A<B>("") {
|
||||||
|
fun foo() {
|
||||||
|
A<B>("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// ISSUE: KT-64841
|
||||||
|
abstract class A<X, Y : A<X, Y>>
|
||||||
|
|
||||||
|
abstract class B<X, T, Y : B<X, T, Y>>(delegate: A<X, *>) : A<X, Y>() {
|
||||||
|
inner class C<R> : B<X, R, C<R>>(<!ARGUMENT_TYPE_MISMATCH!>this<!>)
|
||||||
|
}
|
||||||
compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypesInitial.kt
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
// ISSUE: KT-64841
|
||||||
|
abstract class A<X, Y : A<X, Y>>
|
||||||
|
|
||||||
|
abstract class B<X, T, Y : B<X, T, Y>>(delegate: A<X, *>) : A<X, Y>() {
|
||||||
|
inner class C<R> : B<X, R, C<R>>(this)
|
||||||
|
}
|
||||||
Generated
+12
@@ -21380,6 +21380,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypes.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("callingOuterGenericClassConstructorWithSelfTypesInitial.kt")
|
||||||
|
public void testCallingOuterGenericClassConstructorWithSelfTypesInitial() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inner/callingOuterGenericClassConstructorWithSelfTypesInitial.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("classesInClassObjectHeader.kt")
|
@TestMetadata("classesInClassObjectHeader.kt")
|
||||||
public void testClassesInClassObjectHeader() throws Exception {
|
public void testClassesInClassObjectHeader() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user