Files
kotlin-fork/compiler/testData/ir/irText/classes/objectLiteralExpressions.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

95 lines
1.3 KiB
Kotlin
Vendored

interface IFoo {
abstract fun foo()
}
val test1: Any
field = { // BLOCK
local class <no name provided> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
<no name provided>()
}
get
val test2: IFoo
field = { // BLOCK
local class <no name provided> : IFoo {
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 {
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 {
constructor() /* primary */ {
<this>.super/*Inner*/()
/* <init>() */
}
override fun foo() {
println(message = "foo")
}
}
<no name provided>()
}
}