November 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8965

           Summary: Implement mixin template for forwading constructors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: andrej.mitrovich@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-11-05 20:50:40 PST ---
The syntax should be a simple as doing 'mixin Forward' in a class. This would alleviate the pain of having to duplicate code just to forward to base class constructors. Hardcoded example:

import std.stdio;

mixin template Forward()
{
    this(int x) { super(x); }
}

class Foo
{
    this(int i) { writeln(i); }
}

class Bar : Foo
{
    mixin Forward;
}

void main()
{
    auto bar = new Bar(1);
}

It should be relatively easy to implement.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 31, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8965


Peter Alexander <peter.alexander.au@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |peter.alexander.au@gmail.co
                   |                            |m
         Resolution|                            |DUPLICATE


--- Comment #1 from Peter Alexander <peter.alexander.au@gmail.com> 2012-12-31 09:57:24 PST ---
Duplicates your more recent enhancement request. Marking this one as dup because the more recent one has a possible implementation.

*** This issue has been marked as a duplicate of issue 9066 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------