Support empty if-statements
Type-check "if (...) ;" to Unit, report "implicit cast to Unit", propagate data flow info out of its condition #KT-2478 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user