#1864 Call super class constructor with default parameters

Yuri Strot Wed 28 Mar 2012

Take a look at the following example:

class A { new make() {} }

class B : A { new make() {} }

class C { new make(Str name := "") {} }

class D : C { new make() {} }

There is an compiler error in declaring make of class D: Must call super class constructor. For me there is no difference between classes B and D because their base classes both have default constructor which can be called automatically. Does it make sense to fix it?

brian Wed 28 Mar 2012

Promoted to ticket #1864 and assigned to brian

At first glance, seems like maybe an oversight we should fix. I'll look at it, and see if I can clean up the behavior.

brian Wed 18 Oct

Ticket cancelled

Old ticket, and think the current behavior seems fine - maybe a little verbose but explicit. You'd just have to do this:

class D : C { new make() : super.make() {} }

Login or Signup to reply.