Files
kotlin/compiler/testData/diagnostics/tests/controlStructures/emptyIf.kt
Alexey Sedunov 9fee8600cb Pseudocode: Do not generate implicit return instruction inside of
Unit-typed lambdas
 #KT-5549 Fixed
2014-08-05 18:14:40 +04:00

16 lines
228 B
Kotlin

fun foo(x: Unit) = x
fun test() {
if (false);
if (true);
val x = <!IMPLICIT_CAST_TO_UNIT_OR_ANY!>if (false)<!>;
foo(x)
val y: Unit = if (false);
foo(y)
foo({if (1==1);}())
return if (true);
}