Simplify comparison fix introduced #KT-10509 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: String?) {
|
||||
if (x == null) {
|
||||
|
||||
}
|
||||
else {
|
||||
if (<caret>x == null) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: String?) {
|
||||
if (x == null) {
|
||||
|
||||
}
|
||||
else {
|
||||
if (false) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int) {
|
||||
if (<caret>x != null) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int) {
|
||||
if (true) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int) {
|
||||
if (<caret>x != null || x == null) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int) {
|
||||
if (true) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int, arg: Boolean) {
|
||||
if (arg && <caret>x != null) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Simplify comparison" "true"
|
||||
fun foo(x: Int, arg: Boolean) {
|
||||
if (arg) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user