mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
16 lines
286 B
Kotlin
Vendored
16 lines
286 B
Kotlin
Vendored
fun foo(x: Unit) = x
|
|
|
|
fun test() {
|
|
if (false);
|
|
if (true);
|
|
|
|
val x = <!INVALID_IF_AS_EXPRESSION!>if<!> (false);
|
|
foo(x)
|
|
|
|
val y: Unit = <!INVALID_IF_AS_EXPRESSION!>if<!> (false);
|
|
foo(y)
|
|
|
|
foo({if (1==1);}())
|
|
|
|
return <!INVALID_IF_AS_EXPRESSION!>if<!> (true);
|
|
} |