Add "flip equals" intention for String.equals extension from stdlib

So #KT-19282 Fixed
This commit is contained in:
Toshiaki Kameyama
2017-08-07 15:01:22 +03:00
committed by Mikhail Glukhikh
parent 0efdcb59fa
commit 82fc221470
10 changed files with 118 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.intentions.SwapStringEqualsIgnoreCaseIntention
@@ -0,0 +1,4 @@
// IS_APPLICABLE: false
fun test() {
"ABC".equals<caret>("abc")
}
@@ -0,0 +1,8 @@
// WITH_RUNTIME
fun test() {
"ABC".equa<caret>ls(Foo().bar(), ignoreCase = true)
}
class Foo {
fun bar(): String = ""
}
@@ -0,0 +1,8 @@
// WITH_RUNTIME
fun test() {
Foo().bar().equa<caret>ls("ABC", ignoreCase = true)
}
class Foo {
fun bar(): String = ""
}