mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
Type-check "if (...) ;" to Unit, report "implicit cast to Unit", propagate data flow info out of its condition #KT-2478 Fixed
13 lines
218 B
Kotlin
13 lines
218 B
Kotlin
fun box(): String {
|
|
if (true);
|
|
if (false);
|
|
val iftrue = if (true);
|
|
val iffalse = if (false);
|
|
|
|
var state = 0
|
|
val k = if (state++==1);
|
|
if (state != 1) return "Fail: $state"
|
|
|
|
return "OK"
|
|
}
|