[NI] Remove lambda coersion to Unit in case of error return type(s)
Coersion to Unit from error type leads to misleading type mismatches: "expected <expected lambda return type> found Unit", despite no user-provided Unit / empty lambda. These diagnostics were collected, but not reported before, and that had been disguising the issue for a while. KT-34729 Fixed
This commit is contained in:
+5
-5
@@ -14715,11 +14715,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class NotNullAssertions extends AbstractLightAnalysisModeTest {
|
||||
@TestMetadata("paramAssertionMessage.kt")
|
||||
public void ignoreParamAssertionMessage() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/paramAssertionMessage.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
@@ -14808,6 +14803,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullableTypeParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("paramAssertionMessage.kt")
|
||||
public void testParamAssertionMessage() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/paramAssertionMessage.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticCallErrorMessage.kt")
|
||||
public void testStaticCallErrorMessage() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/staticCallErrorMessage.kt");
|
||||
|
||||
Reference in New Issue
Block a user