Introduce Variable: Compare receivers (both implicit and explicit) when looking for expression occurrences
#KT-4819 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
class A {
|
||||
val value : Int = 0
|
||||
}
|
||||
|
||||
fun foo(body: A.() -> Unit) {}
|
||||
|
||||
fun bar() {
|
||||
foo {
|
||||
print(<selection>value</selection>)
|
||||
print(value)
|
||||
}
|
||||
|
||||
foo {
|
||||
print(value)
|
||||
print(value)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class A {
|
||||
val value : Int = 0
|
||||
}
|
||||
|
||||
fun foo(body: A.() -> Unit) {}
|
||||
|
||||
fun bar() {
|
||||
foo {
|
||||
val i = value
|
||||
print(i)
|
||||
print(i)
|
||||
}
|
||||
|
||||
foo {
|
||||
print(value)
|
||||
print(value)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user