[FIR] Fix determining nullability of arguments during enhancement
This commit is contained in:
+5
@@ -601,6 +601,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeMismatchOnExpectedJavaMap.kt")
|
||||
public void testTypeMismatchOnExpectedJavaMap() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/typeMismatchOnExpectedJavaMap.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("untouchedReturnInIf.kt")
|
||||
public void testUntouchedReturnInIf() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/untouchedReturnInIf.kt");
|
||||
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
FILE: main.kt
|
||||
public final fun <T> test(executor: R|BuildActionExecuter<T>|, modelType: R|java/lang/Class<T>|, env: R|kotlin/collections/Map<kotlin/String, kotlin/String>|): R|kotlin/Unit| {
|
||||
lval model: R|ft<BuildActionExecuter<ft<T, T?>!>, BuildActionExecuter<ft<T, T?>!>?>!| = R|<local>/executor|.R|SubstitutionOverride</BuildActionExecuter.setEnvironmentVariables: R|ft<BuildActionExecuter<ft<T, T?>!>, BuildActionExecuter<ft<T, T?>!>?>!|>|(R|<local>/env|)
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// FULL_JDK
|
||||
|
||||
// FILE: LongRunningOperation.java
|
||||
import java.util.Map;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface LongRunningOperation {
|
||||
LongRunningOperation setEnvironmentVariables(@Nullable Map<String, String> envVariables);
|
||||
}
|
||||
|
||||
// FILE: ConfigurableLauncher.java
|
||||
import java.util.Map;
|
||||
|
||||
public interface ConfigurableLauncher<T extends ConfigurableLauncher<T>> extends LongRunningOperation {
|
||||
@Override
|
||||
T setEnvironmentVariables(Map<String, String> envVariables);
|
||||
}
|
||||
|
||||
// FILE: BuildActionExecuter.java
|
||||
public interface BuildActionExecuter<T> extends ConfigurableLauncher<BuildActionExecuter<T>> {}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun <T> test(executor: BuildActionExecuter<T>, modelType: Class<T>, env: Map<String, String>) {
|
||||
val model = executor.setEnvironmentVariables(env)
|
||||
}
|
||||
+6
@@ -707,6 +707,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeMismatchOnExpectedJavaMap.kt")
|
||||
public void testTypeMismatchOnExpectedJavaMap() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/typeMismatchOnExpectedJavaMap.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("untouchedReturnInIf.kt")
|
||||
public void testUntouchedReturnInIf() throws Exception {
|
||||
|
||||
+6
@@ -711,6 +711,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/tryInLambda.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeMismatchOnExpectedJavaMap.kt")
|
||||
public void testTypeMismatchOnExpectedJavaMap() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/typeMismatchOnExpectedJavaMap.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("untouchedReturnInIf.kt")
|
||||
public void testUntouchedReturnInIf() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user