www.digitalmars.com         C & C++   DMDScript  
Archives

D Programming
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger
D.gnu
D

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics


digitalmars.D.bugs - [Issue 3072] New: tuples can't be aliases

http://d.puremagic.com/issues/show_bug.cgi?id=3072

           Summary: tuples can't be aliases
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: shro8822 vandals.uidaho.edu


D1.0

import std.stdio;

template Ta(alias t){void Tfn(){writef(t);}}
template Tt(t...){void Tfn(){writef(t);}}

struct S
{
   int i; int j; int k;
   mixin Ta!(i);  // passes
   mixin Tt!(i,j);  // fails
}

this causes issues for mixin function that are supposed to work on a subset of
the members of the enclosing type. The string mixin work around is just flat
ugly.

I don't think the spec says this shouldn't work so I'm calling it a bug.

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