Report error about invalid if as expression on the if keyword
#KT-14633 Fixed
This commit is contained in:
@@ -14,7 +14,7 @@ fun test1(word: String) =
|
||||
fun test2(word: String) =
|
||||
run {
|
||||
if (word.length > 4) {
|
||||
<!INVALID_IF_AS_EXPRESSION!>if (word.startsWith("a")) <!IMPLICIT_CAST_TO_ANY!>longWords++<!><!>
|
||||
<!INVALID_IF_AS_EXPRESSION!>if<!> (word.startsWith("a")) <!IMPLICIT_CAST_TO_ANY!>longWords++<!>
|
||||
}
|
||||
else {
|
||||
<!IMPLICIT_CAST_TO_ANY!>smallWords.add(word)<!>
|
||||
|
||||
Reference in New Issue
Block a user