JVM: correctly merge typed null values

1. merge(null of type A, null of type B) = null of unknown type;
2. merge(null of type A, something of type B) = merge(unknown null, B).

^KT-52311 Fixed
This commit is contained in:
pyos
2022-05-10 15:29:51 +02:00
committed by teamcity
parent dcdd1cd14e
commit 513ef575ce
11 changed files with 160 additions and 2 deletions
@@ -7944,6 +7944,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/coroutines/kt51718.kt");
}
@TestMetadata("kt52311_nullOnLeft.kt")
public void testKt52311_nullOnLeft() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/kt52311_nullOnLeft.kt");
}
@TestMetadata("kt52311_nullOnRight.kt")
public void testKt52311_nullOnRight() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/kt52311_nullOnRight.kt");
}
@TestMetadata("lastExpressionIsLoop.kt")
public void testLastExpressionIsLoop() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt");