Files
kotlin-fork/compiler/testData/ir/irText/expressions/objectReference.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

93 lines
1.4 KiB
Plaintext
Vendored

object Z {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
var counter: Int
field = 0
get
set
fun foo() {
}
fun bar() {
<this>.<set-counter>(<set-?> = 1)
<this>.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
class Nested {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
init {
Z.<set-counter>(<set-?> = 1)
Z.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
fun test() {
Z.<set-counter>(<set-?> = 1)
Z.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
}
val aLambda: Function0<Unit>
field = local fun <anonymous>() {
Z.<set-counter>(<set-?> = 1)
Z.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
get
val anObject: Any
field = { // BLOCK
local class <no name provided> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
init {
Z.<set-counter>(<set-?> = 1)
Z.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
fun test() {
Z.<set-counter>(<set-?> = 1)
Z.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
}
<no name provided>()
}
get
}
fun Z.test() {
<this>.<set-counter>(<set-?> = 1)
<this>.foo()
Z.<set-counter>(<set-?> = 1)
Z.foo()
}