code style inspection: to -> Pair function used not in infix form
This commit is contained in:
committed by
Dmitry Jemerov
parent
41739602bc
commit
37351c344f
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.ReplaceToWithInfixFormInspection
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
class A
|
||||
class B
|
||||
|
||||
fun foo(a: A, b: B) {
|
||||
val pair = a.<caret>to(b)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
class A
|
||||
class B
|
||||
|
||||
fun foo(a: A, b: B) {
|
||||
val pair = a to b
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// PROBLEM: none
|
||||
class A {
|
||||
fun to(x: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
A().<caret>to(1)
|
||||
}
|
||||
Reference in New Issue
Block a user