KT-10646, KT-10647:

Move IMPLICIT_CAST_TO_UNIT_OR_ANY to ControlFlowInformationProvider
(where checks for 'if' and 'when' used as expressions are performed).
This commit is contained in:
Dmitry Petrov
2016-01-13 16:43:41 +03:00
parent f91c01919b
commit f54de08073
11 changed files with 103 additions and 54 deletions
@@ -0,0 +1,7 @@
val test1 = { <!IMPLICIT_CAST_TO_UNIT_OR_ANY!>if (true) 1 else ""<!> }
val test2 = { { <!IMPLICIT_CAST_TO_UNIT_OR_ANY!>if (true) 1 else ""<!> } }
val test3: (Boolean) -> Any = { if (it) 1 else "" }
val test4: (Boolean) -> Any? = { if (it) 1 else "" }