KT-10192 got fixed due to new if/when check
(which doesn't depend on the expected type for expression) #KT-10192 Fixed
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
fun test1() {
|
||||
if (true) {
|
||||
when (true) {
|
||||
true -> println()
|
||||
}
|
||||
} else {
|
||||
System.out?.println() // kotlin.Unit?
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val mlist = arrayListOf("")
|
||||
if (true) {
|
||||
when (true) {
|
||||
true -> println()
|
||||
}
|
||||
} else {
|
||||
mlist.add("") // kotlin.Boolean
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public fun test1(): kotlin.Unit
|
||||
public fun test2(): kotlin.Unit
|
||||
@@ -71,6 +71,12 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt10192.kt")
|
||||
public void testKt10192() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt10192.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt9078.kt")
|
||||
public void testKt9078() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt9078.kt");
|
||||
|
||||
Reference in New Issue
Block a user