www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12286] New: Can't use two alias parameters to class and subclass field

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12286

           Summary: Can't use two alias parameters to class and subclass
                    field
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow gmail.com> 2014-03-02
21:10:49 EET ---
//////////// test.d ///////////
class A     { int i; }
class B : A { int j; }

template copy(alias a, alias b)
{
    void copy() { a = b; }
}

class C : B
{
    alias copyIJ = copy!(i, j);
}
///////////////////////////////

Error:
test.d(11): Error: template instance copy!(i, j) copy!(i, j) is nested in both
A and B

The template should be nested in the descendant type.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 02 2014
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12286


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
             Blocks|                            |12230


--- Comment #1 from Vladimir Panteleev <thecybershadow gmail.com> 2014-03-02
22:31:41 EET ---
https://github.com/D-Programming-Language/dmd/pull/3345

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