mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
30 lines
410 B
Plaintext
Vendored
30 lines
410 B
Plaintext
Vendored
package toplevelObjectDeclarations
|
|
|
|
open class Foo(y : Int) {
|
|
~foo()~open fun foo() : Int = 1
|
|
}
|
|
|
|
object ~A~A : Foo(0) {
|
|
~x~val x : Int = 2
|
|
|
|
fun test() {
|
|
return `x`x + `foo()`foo()
|
|
}
|
|
}
|
|
|
|
object B : A {}
|
|
|
|
~ns.x~val x = `A`A.`foo()`foo()
|
|
|
|
fun f() {
|
|
~y~val y = object : Foo(`ns.x`x) {
|
|
init {
|
|
`ns.x`x + 12
|
|
}
|
|
|
|
~y.foo()~override fun foo() : Int = 1
|
|
}
|
|
|
|
val z = `y`y.`y.foo()`foo()
|
|
}
|