Correct handling of "Redundant if" for negation case #KT-14575 Fixed

This commit is contained in:
shiraji
2016-10-30 06:27:47 +09:00
committed by Mikhail Glukhikh
parent 62f81e795c
commit e7575599eb
4 changed files with 70 additions and 33 deletions
+9
View File
@@ -0,0 +1,9 @@
// "Remove redundant 'if' statement" "true"
fun bar(value: Int): Boolean {
<caret>if (value % 2 == 0) {
return false
}
else {
return true
}
}
+4
View File
@@ -0,0 +1,4 @@
// "Remove redundant 'if' statement" "true"
fun bar(value: Int): Boolean {
return value % 2 != 0
}