Bug 9083 – mixin expression on template argument doesn't work

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-27T07:12:00Z
Last change time
2013-01-17T23:18:23Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Depends on
9100

Comments

Comment #0 by k.hara.pg — 2012-11-27T07:12:08Z
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();
Comment #1 by k.hara.pg — 2012-11-27T07:20:05Z
Comment #2 by k.hara.pg — 2012-11-30T21:17:05Z
Comment #3 by github-bugzilla — 2012-12-09T12:52:03Z
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
Comment #4 by k.hara.pg — 2013-01-17T23:18:23Z
Fixed in 2.061.