KT-11975 Invert if-condition intention does not simplify "is" expresssion

#KT-11975 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-06-17 18:09:07 +03:00
parent 3fa87fe4de
commit 1b16ff6c82
8 changed files with 53 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
fun f(p: Any, set: Set<Any>) {
<caret>if (p in set) {
//TODO
}
}
@@ -0,0 +1,4 @@
fun f(p: Any, set: Set<Any>) {
if (p !in set) return
//TODO
}
+5
View File
@@ -0,0 +1,5 @@
fun f(p: Any) {
<caret>if (p is String) {
//TODO
}
}
@@ -0,0 +1,4 @@
fun f(p: Any) {
if (p !is String) return
//TODO
}
+5
View File
@@ -0,0 +1,5 @@
fun f(p: Any) {
<caret>if (p !is String) {
//TODO
}
}
@@ -0,0 +1,4 @@
fun f(p: Any) {
if (p is String) return
//TODO
}