Thread overview
[Issue 9083] New: mixin expression on template argument doesn't work
Nov 27, 2012
Kenji Hara
Nov 27, 2012
Kenji Hara
Dec 01, 2012
Kenji Hara
Jan 18, 2013
Kenji Hara
November 27, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9083

           Summary: mixin expression on template argument doesn't work
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2012-11-27 07:12:08 PST ---
Following code doesn't work.

template isFunction(X...) if (X.length == 1)
{
    enum isFunction = true;
}

struct S
{
    static string func(alias Class)()
    {
        foreach (m; __traits(allMembers, Class))
        {
            pragma(msg, m);  // prints "func"
            enum x = isFunction!(mixin(m));  //NG
          //enum x = isFunction!(func);  //OK
        }
        return "";
    }
}
enum nothing = S.func!S();

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-11-27 07:20:05 PST ---
https://github.com/D-Programming-Language/dmd/pull/1328

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



--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-11-30 21:17:05 PST ---
(In reply to comment #1)
> https://github.com/D-Programming-Language/dmd/pull/1328

This bug depends on bug 9100. https://github.com/D-Programming-Language/dmd/pull/1340

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



--- Comment #3 from github-bugzilla@puremagic.com 2012-12-09 12:52:03 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/81d858dbd172196be9c83e42a32700ca69ed835f fix Issue 9083 - mixin expression on template argument doesn't work

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 18, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9083


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> 2013-01-17 23:18:23 PST ---
Fixed in 2.061.

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