Change Signature: Search & process as-property usages of Java methods (This ixes some muted tests on Change Signature for properties).
Improve test data
This commit is contained in:
committed by
Alexey Sedunov
parent
ad0c12935b
commit
8d3296e08d
@@ -1,26 +1,35 @@
|
||||
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
open class A {
|
||||
open var <caret>String.p: Int = 1
|
||||
open var String.p: Int = 1
|
||||
}
|
||||
|
||||
class B: A() {
|
||||
override var String.p: Int = 2
|
||||
class AA : A() {
|
||||
override var String.p: Int = 1
|
||||
}
|
||||
|
||||
class B : J() {
|
||||
override var String.p: Int = 1
|
||||
}
|
||||
|
||||
fun test() {
|
||||
with(A()) {
|
||||
val t = "".p
|
||||
"".p = 1
|
||||
"".p = 3
|
||||
}
|
||||
|
||||
with(AA()) {
|
||||
val t = "".p
|
||||
"".p = 3
|
||||
}
|
||||
|
||||
with(J()) {
|
||||
val t = "".p
|
||||
"".p = 3
|
||||
}
|
||||
|
||||
with(B()) {
|
||||
val t = "".p
|
||||
"".p = 2
|
||||
}
|
||||
|
||||
with(J()) {
|
||||
val t = getP("")
|
||||
setP("", 3)
|
||||
"".p = 3
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user