Files
kotlin-fork/compiler/testData/ir/irText/expressions/objectReference.kt
T
Roman Artemev e57d34dd9e Make fix test:
- [JS IR] Unmute fixed tests
 - [IrText] Update testdata
 - [WASM] Temporary turn wasm test off
 - [FirText] Temporary turn fit text tests off
 - [JVM IR] Turn off klib jvm test
 - [IR] Add new test
2020-02-14 18:22:17 +03:00

58 lines
871 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: ANY
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()
}
}
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()
}