www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14676] New: Calling the constructor of the parent class of an

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

          Issue ID: 14676
           Summary: Calling the constructor of the parent class of an
                    anonymous class
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: sigurdbergsvela gmail.com

As an enhancement; the ability to call the constructor of the parent class when
creating an anonymous class.

    class A {
        this(int param) {

        }
    }

    A anonymous = new class A(12) {}
                             ^  ^

--
Jun 10 2015