Correct handling of "Redundant if" for negation case #KT-14575 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
62f81e795c
commit
e7575599eb
@@ -0,0 +1,9 @@
|
||||
// "Remove redundant 'if' statement" "true"
|
||||
fun bar(value: Int): Boolean {
|
||||
<caret>if (value % 2 == 0) {
|
||||
return false
|
||||
}
|
||||
else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Remove redundant 'if' statement" "true"
|
||||
fun bar(value: Int): Boolean {
|
||||
return value % 2 != 0
|
||||
}
|
||||
Reference in New Issue
Block a user