Introduce "double negation" inspection #KT-4748 Fixed
This commit is contained in:
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.KotlinDoubleNegationInspection
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val b = !!<caret>"".equals("")
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val b = "".equals("")
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: none
|
||||
operator fun Int.not() = this * -1
|
||||
fun foo() {
|
||||
val c = !!<caret>1
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val b = !(!<caret>true)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val b = true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val b = !!<caret>true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
val b = true
|
||||
}
|
||||
Reference in New Issue
Block a user