Drop resolution of deprecated plus/minus/get/set conventions
Also remove the corresponding quick fix
This commit is contained in:
@@ -3,4 +3,3 @@ Function call 11 A(0) plus A(1) plus 2
|
||||
Function call 12 A(0).plus(A(1).plus(2))
|
||||
Function call 15 a += 1
|
||||
Function call 6 fun plus(a: A): A = this + a.n
|
||||
Unclassified usage 18 +A(0)
|
||||
|
||||
@@ -38,14 +38,7 @@ annotation class Fancy(val param: Int)
|
||||
|
||||
@Fancy(<caret>i) class D
|
||||
|
||||
class CustomDelegate {
|
||||
operator fun get(thisRef: Any?, prop: KProperty<*>): String = ""
|
||||
operator fun set(thisRef: Any?, prop: KProperty<*>, value: String) {}
|
||||
}
|
||||
|
||||
class B {
|
||||
var a: String by CustomDelegate()
|
||||
|
||||
fun plus(a: A): A = A()
|
||||
}
|
||||
|
||||
|
||||
@@ -37,14 +37,7 @@ annotation class Fancy(val param: Int)
|
||||
|
||||
@Fancy(i) class D
|
||||
|
||||
class CustomDelegate {
|
||||
operator fun getValue(thisRef: Any?, prop: KProperty<*>): String = ""
|
||||
operator fun setValue(thisRef: Any?, prop: KProperty<*>, value: String) {}
|
||||
}
|
||||
|
||||
class B {
|
||||
var a: String by CustomDelegate()
|
||||
|
||||
operator fun plus(a: A): A = A()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Rename to 'getValue'" "true"
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class CustomDelegate
|
||||
|
||||
operator fun CustomDelegate.get(thisRef: Any?, prop: KProperty<*>): String = ""
|
||||
|
||||
class Example {
|
||||
val a: String <caret>by CustomDelegate()
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// "Rename to 'getValue'" "true"
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class CustomDelegate
|
||||
|
||||
operator fun CustomDelegate.getValue(thisRef: Any?, prop: KProperty<*>): String = ""
|
||||
|
||||
class Example {
|
||||
val a: String by CustomDelegate()
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// "Rename to 'setValue'" "true"
|
||||
// ERROR: 'get' method convention on type 'CustomDelegate' is no longer supported. Rename to 'getValue'
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class CustomDelegate {
|
||||
operator fun get(thisRef: Any?, prop: KProperty<*>): String = ""
|
||||
operator fun set(thisRef: Any?, prop: KProperty<*>, value: String) {}
|
||||
}
|
||||
|
||||
class Example {
|
||||
var a: String <caret>by CustomDelegate()
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// "Rename to 'setValue'" "true"
|
||||
// ERROR: 'get' method convention on type 'CustomDelegate' is no longer supported. Rename to 'getValue'
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class CustomDelegate {
|
||||
operator fun get(thisRef: Any?, prop: KProperty<*>): String = ""
|
||||
operator fun setValue(thisRef: Any?, prop: KProperty<*>, value: String) {}
|
||||
}
|
||||
|
||||
class Example {
|
||||
var a: String by CustomDelegate()
|
||||
}
|
||||
Reference in New Issue
Block a user