[Test] Add a test covering for resolution to subsumed members for raw types

^KT-57620
This commit is contained in:
Anastasia.Nekrasova
2023-07-10 16:40:27 +03:00
committed by Space Team
parent e12e78d96b
commit fcba0ad75e
7 changed files with 138 additions and 0 deletions
@@ -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())
}
+29
View File
@@ -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())
}