Bug 13668 – [ICE] unable to compile __traits(allMembers...)
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-10-31T15:10:00Z
Last change time
2015-02-18T03:39:03Z
Keywords
ice, pull
Assigned to
nobody
Creator
misugi-pwnu
Comments
Comment #0 by misugi-pwnu — 2014-10-31T15:10:54Z
This code gives me a segmentation fault with dmd 2.066 and 2.065
import std.stdio;
class User : Entity!User
{
int id;
}
class Entity(T)
{
pragma(msg, generateProperties!(T));
}
template generateProperties(alias To)
{
string getProperties(alias Ta)()
{
import std.string : capitalize;
string toRet = "";
// This line is bad
pragma(msg, __traits(allMembers, Ta));
return toRet;
}
enum generateProperties = getProperties!(To);
}
void main() { }