c605cb9855
#KT-59548 Fixed
70 lines
1.0 KiB
Kotlin
Vendored
70 lines
1.0 KiB
Kotlin
Vendored
// FIR_IDENTICAL
|
|
object Z {
|
|
var counter = 0
|
|
fun foo() {}
|
|
|
|
fun bar() {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
|
|
class Nested {
|
|
init {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
|
|
fun test() {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
}
|
|
|
|
fun aFun() {
|
|
withLambda {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
}
|
|
|
|
val aLambda = {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
|
|
val anObject = object {
|
|
init {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
|
|
fun test() {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
}
|
|
}
|
|
|
|
fun Z.test() {
|
|
counter = 1
|
|
foo()
|
|
Z.counter = 1
|
|
Z.foo()
|
|
}
|
|
|
|
fun withLambda(f: () -> Unit) {}
|