Files
kotlin-fork/compiler/testData/ir/irText/classes/objectLiteralExpressions.fir.kt.txt
T
2021-02-19 10:39:57 +03:00

95 lines
1.4 KiB
Plaintext
Vendored

interface IFoo {
abstract fun foo()
}
val test1: Any
field = { // BLOCK
local class <no name provided> {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
<no name provided>()
}
get
val test2: IFoo
field = { // BLOCK
local class <no name provided> : IFoo {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun foo() {
println(message = "foo")
}
}
<no name provided>()
}
get
class Outer {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
abstract inner class Inner : IFoo {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
fun test3(): Inner {
return { // BLOCK
local class <no name provided> : Inner {
private constructor() /* primary */ {
<this>.super/*Inner*/()
/* <init>() */
}
override fun foo() {
println(message = "foo")
}
}
<no name provided>()
}
}
}
fun Outer.test4(): Inner {
return { // BLOCK
local class <no name provided> : Inner {
private constructor() /* primary */ {
<this>.super/*Inner*/()
/* <init>() */
}
override fun foo() {
println(message = "foo")
}
}
<no name provided>()
}
}