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() { }
Comment #1 by k.hara.pg — 2014-11-01T09:07:31Z
Comment #2 by github-bugzilla — 2014-11-02T01:16:42Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/62cc5c86f54abdf1f2ad39c6ceda3a6efb41b334 fix Issue 13668 - [ICE] unable to compile __traits(allMembers...) https://github.com/D-Programming-Language/dmd/commit/a62084e586e10912729d083892b5da82cb26094b Merge pull request #4103 from 9rnsr/fix13668 Issue 13668 - [ICE] unable to compile __traits(allMembers...)
Comment #3 by k.hara.pg — 2014-12-08T01:37:25Z
*** Issue 13830 has been marked as a duplicate of this issue. ***
Comment #4 by github-bugzilla — 2015-02-18T03:39:03Z