Thread overview
[Issue 6966] New: cannot create qualified type from tuple entry
Nov 17, 2011
timon.gehr@gmx.ch
Nov 17, 2011
timon.gehr@gmx.ch
Jul 19, 2012
Kenji Hara
November 17, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6966

           Summary: cannot create qualified type from tuple entry
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: timon.gehr@gmx.ch


--- Comment #0 from timon.gehr@gmx.ch 2011-11-17 07:30:09 PST ---
template X(T...){
    alias const(T[0]) X;
}
static assert(is(X!(int) == const(int))); // fail

The static assertion should pass.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 17, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6966



--- Comment #1 from timon.gehr@gmx.ch 2011-11-17 07:30:25 PST ---
Workaround:

template XImpl(T...){
    alias T[0] _;
    alias const(_) X;
}
template X(T...){alias XImpl!T.X X;}

static assert(is(X!(int) == const(int))); // pass

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


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, wrong-code
           Platform|Other                       |All
         OS/Version|Linux                       |All


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-07-19 06:10:48 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1055

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