[Test] Add a test covering for resolution to subsumed members for raw types
^KT-57620
This commit is contained in:
committed by
Space Team
parent
e12e78d96b
commit
fcba0ad75e
+16
@@ -25675,6 +25675,22 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/rawTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class RawTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInRawTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/rawTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57620.kt")
|
||||
public void testKt57620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawTypes/kt57620.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/reassignment")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -25675,6 +25675,22 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/rawTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class RawTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInRawTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/rawTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57620.kt")
|
||||
public void testKt57620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawTypes/kt57620.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/reassignment")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -25675,6 +25675,22 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/rawTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class RawTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInRawTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/rawTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57620.kt")
|
||||
public void testKt57620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawTypes/kt57620.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/reassignment")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -25681,6 +25681,22 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/rawTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class RawTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInRawTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/rawTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57620.kt")
|
||||
public void testKt57620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawTypes/kt57620.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/reassignment")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// !CHECK_TYPE
|
||||
// FILE: PythonRunParams.java
|
||||
import java.util.Map;
|
||||
|
||||
public interface PythonRunParams {
|
||||
Map<String, String> fetchEnvs();
|
||||
}
|
||||
|
||||
// FILE: AbstractPythonRunConfiguration.java
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class AbstractPythonRunConfiguration<T> implements PythonRunParams {
|
||||
public Map<String, String> fetchEnvs() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: PythonRunConfiguration.java
|
||||
public class PythonRunConfiguration extends AbstractPythonRunConfiguration implements PythonRunParams {}
|
||||
|
||||
// FILE: ProjectMain.kt
|
||||
|
||||
fun getRunCommandLine(configuration: PythonRunConfiguration) {
|
||||
fun foo(envs: Map<String, String>) {}
|
||||
checkSubtype<Map<String, String>>(<!ARGUMENT_TYPE_MISMATCH!>configuration.fetchEnvs()<!>)
|
||||
checkSubtype<Map<*, *>>(configuration.fetchEnvs())
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// !CHECK_TYPE
|
||||
// FILE: PythonRunParams.java
|
||||
import java.util.Map;
|
||||
|
||||
public interface PythonRunParams {
|
||||
Map<String, String> fetchEnvs();
|
||||
}
|
||||
|
||||
// FILE: AbstractPythonRunConfiguration.java
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class AbstractPythonRunConfiguration<T> implements PythonRunParams {
|
||||
public Map<String, String> fetchEnvs() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: PythonRunConfiguration.java
|
||||
public class PythonRunConfiguration extends AbstractPythonRunConfiguration implements PythonRunParams {}
|
||||
|
||||
// FILE: ProjectMain.kt
|
||||
|
||||
fun getRunCommandLine(configuration: PythonRunConfiguration) {
|
||||
fun foo(envs: Map<String, String>) {}
|
||||
checkSubtype<Map<String, String>>(configuration.fetchEnvs())
|
||||
checkSubtype<Map<*, *>>(configuration.fetchEnvs())
|
||||
}
|
||||
Generated
+16
@@ -26519,6 +26519,22 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/rawTypes")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class RawTypes {
|
||||
@Test
|
||||
public void testAllFilesPresentInRawTypes() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/rawTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57620.kt")
|
||||
public void testKt57620() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawTypes/kt57620.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/reassignment")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user