Make "Add operator modifier" an inspection instead of intention
#KT-31533 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
5123e1f078
commit
4c62788c3e
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.AddOperatorModifierInspection
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
fun <caret>contains(other: A): Boolean = true
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
operator fun <caret>contains(other: A): Boolean = true
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// PROBLEM: none
|
||||
class A {
|
||||
fun <caret>contains(other: A): Int = -1
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
}
|
||||
|
||||
fun A.<caret>plus(other: A): A = A()
|
||||
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
}
|
||||
|
||||
operator fun A.<caret>plus(other: A): A = A()
|
||||
@@ -0,0 +1,9 @@
|
||||
open class A {
|
||||
open fun plus(other: A): A = A()
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun <caret>plus(other: A): A {
|
||||
return super.plus(other)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
open class A {
|
||||
open fun plus(other: A): A = A()
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override operator fun <caret>plus(other: A): A {
|
||||
return super.plus(other)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// PROBLEM: none
|
||||
open class A {
|
||||
open operator fun plus(a: A) = A()
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun plu<caret>s(a: A) = A()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
public fun <caret>plus(other: A): A = A()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
public operator fun plus(other: A): A = A()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: none
|
||||
class A {
|
||||
}
|
||||
|
||||
fun <caret>plus(other: A): A = A()
|
||||
Reference in New Issue
Block a user