Files
kotlin-fork/compiler/testData/diagnostics/tests/objects/Objects.fir.kt
T
Andrey Zinovyev 0a68edf3bd [FIR][LightTree] More fixes in diagnostic positioning
Keep tree padding for modifiers
More REFERENCE_EXPRESSIONS kinds
Fix source for some call expressions
2021-04-20 18:13:01 +03:00

30 lines
528 B
Kotlin
Vendored

package toplevelObjectDeclarations
open class Foo(y : Int) {
open fun foo() : Int = 1
}
<!NO_VALUE_FOR_PARAMETER!>class T : <!SUPERTYPE_NOT_INITIALIZED!>Foo<!> {}<!>
<!NO_VALUE_FOR_PARAMETER{LT}!>object A : <!SUPERTYPE_NOT_INITIALIZED!>Foo<!> {
val x : Int = 2
fun test() : Int {
return x + foo(<!NO_VALUE_FOR_PARAMETER{PSI}!>)<!>
}
}<!>
object B : A {}
val x = A.foo()
val y = object : Foo(x) {
init {
x + 12
}
override fun foo() : Int = 1
}
val z = y.foo()