Can I reuse the constructor signature of a supercl...
# getting-started
c
Can I reuse the constructor signature of a superclass, so that I don't have to re-type all the arguments of the constructor?
Copy code
open class SuperClass(val foo: String, val bar: String) {}
open class SubClass : SuperClass {}
val instance = SubClass(foo = "hello", bar = "world") // <-- subclass has same constructor signature as superclass without needing to re-type the signature in SubClass's declaration
k
RIght now, no. IIRC there's an issue for it though.
c
ok, thanks!