K2: reproduce KT-58579
This commit is contained in:
committed by
Space Team
parent
2ff075c961
commit
4e2067a163
+6
@@ -15248,6 +15248,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericCallInThrow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericOnJavaWildcardBoundedByRaw.kt")
|
||||
public void testGenericOnJavaWildcardBoundedByRaw() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericOnJavaWildcardBoundedByRaw.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hasErrorInConstrainingTypes.kt")
|
||||
public void testHasErrorInConstrainingTypes() throws Exception {
|
||||
|
||||
+6
@@ -15248,6 +15248,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericCallInThrow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericOnJavaWildcardBoundedByRaw.kt")
|
||||
public void testGenericOnJavaWildcardBoundedByRaw() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericOnJavaWildcardBoundedByRaw.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hasErrorInConstrainingTypes.kt")
|
||||
public void testHasErrorInConstrainingTypes() throws Exception {
|
||||
|
||||
+6
@@ -15248,6 +15248,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericCallInThrow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericOnJavaWildcardBoundedByRaw.kt")
|
||||
public void testGenericOnJavaWildcardBoundedByRaw() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericOnJavaWildcardBoundedByRaw.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hasErrorInConstrainingTypes.kt")
|
||||
public void testHasErrorInConstrainingTypes() throws Exception {
|
||||
|
||||
+6
@@ -15254,6 +15254,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericCallInThrow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericOnJavaWildcardBoundedByRaw.kt")
|
||||
public void testGenericOnJavaWildcardBoundedByRaw() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericOnJavaWildcardBoundedByRaw.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hasErrorInConstrainingTypes.kt")
|
||||
public void testHasErrorInConstrainingTypes() throws Exception {
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// ISSUE: KT-58579
|
||||
// FILE: Invariant.java
|
||||
public class Invariant<T> {}
|
||||
|
||||
// FILE: Generic.java
|
||||
public class Generic<T> {
|
||||
public class Inner {}
|
||||
public static Invariant<? extends Generic.Inner> foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Main.kt
|
||||
fun main() {
|
||||
val value = Generic.foo()
|
||||
<!NEW_INFERENCE_ERROR!>value.bar()<!>
|
||||
}
|
||||
|
||||
fun <T> T.bar() {}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// ISSUE: KT-58579
|
||||
// FILE: Invariant.java
|
||||
public class Invariant<T> {}
|
||||
|
||||
// FILE: Generic.java
|
||||
public class Generic<T> {
|
||||
public class Inner {}
|
||||
public static Invariant<? extends Generic.Inner> foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Main.kt
|
||||
fun main() {
|
||||
val value = Generic.foo()
|
||||
value.bar()
|
||||
}
|
||||
|
||||
fun <T> T.bar() {}
|
||||
Generated
+6
@@ -15254,6 +15254,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericCallInThrow.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericOnJavaWildcardBoundedByRaw.kt")
|
||||
public void testGenericOnJavaWildcardBoundedByRaw() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/genericOnJavaWildcardBoundedByRaw.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("hasErrorInConstrainingTypes.kt")
|
||||
public void testHasErrorInConstrainingTypes() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user