KT-16437 Incorrect type inference for some when coerced to Unit
If the result of 'when' is not used in an expression, this 'when' expression has type 'Unit' despite of whatever FE has inferred.
This commit is contained in:
@@ -689,6 +689,12 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("whenCoercedToUnit.kt")
|
||||
public void testWhenCoercedToUnit() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("whenElse.kt")
|
||||
public void testWhenElse() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/whenElse.kt");
|
||||
|
||||
Reference in New Issue
Block a user