e57d34dd9e
- [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
58 lines
871 B
Kotlin
Vendored
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()
|
|
} |