[Issue 13635] New: implicit class constructor should instantiate templated base class constructor

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Oct 18 12:22:34 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13635

          Issue ID: 13635
           Summary: implicit class constructor should instantiate
                    templated base class constructor
           Product: D
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

cat > bug.d << CODE
class Base
{
    this(this Derived)() {}
}

class Foo : Base
{
    // this() { super(); } // explicit constructor needed
}
CODE

dmd -c bug

----
bug.d(6): Error: class bug.Foo Cannot implicitly generate a default ctor when
base class bug.Base is missing a default ctor
----

The default constructor code should try to call the super class constructor
without arguments instead of detecting a `this()` function.

--


More information about the Digitalmars-d-bugs mailing list