Trying to overwrite a constructor in a subclass, it kind of works but unexpectedly calls the constructor without args
class A {
fun @construct() {
<<< "A with no args", "" >>>;
}
fun @construct(string name) {
<<< "A with", name>>>;
}
}
class B extends A {
fun @construct(string name) {
super.A("called from B - " + name);
<<< "B with", name>>>;
}
}
new A("Test1") @=> A a;
new B("Test2") @=> B b;
// This will first output "A with no args"
Chuck 1.5.5.6
OS: Windows 11