I was testing overwriting constructors (and using super), which works. But then found out that constructors don't seem to be inherited, if not defined in subclasses. Note that this works fine with instance methods.
class A {
fun @construct(string name) {
<<< "A with", name>>>;
}
}
class B extends A {
fun @construct(string name) {
super.A("called from B - " + name);
<<< "B with", name>>>;
}
}
class C extends B {
}
new A("Test1") @=> A a;
new B("Test2") @=> B b;
new C("Test3") @=> C c; // FAILS
// error: no constructors defined for 'C'
Chuck 1.5.5.6
OS: Windows 11
I was testing overwriting constructors (and using super), which works. But then found out that constructors don't seem to be inherited, if not defined in subclasses. Note that this works fine with instance methods.
Chuck 1.5.5.6
OS: Windows 11