Files
kotlin-fork/plugins/uast-kotlin/testData/SuperCalls.kt
T
Nicolay Mitropolsky b8069b48c5 Uast: returning back secondary constructors bodies (KT-21575)
but secondary constructors without primary constructor will not contain initializers, it is still an issue
2017-12-06 22:19:57 +03:00

35 lines
560 B
Kotlin
Vendored

open class A(val str: String) {
constructor(i: Int) : this(i.toString())
open fun foo(a: Long) {}
}
class B(param: String) : A(param)
class C : A {
constructor(p: String) : super(p)
constructor(i: Int) : super(i) {
println()
}
override fun foo(a: Long) {
super.foo(a)
}
}
object O : A("text")
val anon = object : A("textForAnon") {
fun bar() {
cons(object : A("inner literal"))
}
object innerObject : A("inner object")
inner class InnerClass : A("inner class")
}
fun cons(a: A) {}