Refactoring: make "replace get or set" an inspection

This commit is contained in:
Mikhail Glukhikh
2017-12-19 14:45:15 +03:00
parent 756cb32eaf
commit 91bcfb97c6
50 changed files with 375 additions and 342 deletions
@@ -0,0 +1,20 @@
fun test() {
class Test{
operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0
}
val test = Test()
test<caret>[1, 2, { i ->
i
}]
}
fun withSuppression() {
class Test{
operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0
}
val test = Test()
@Suppress("ReplaceGetOrSet")
test.get(1, 2) { i -> i }
}