digitalmars.D.bugs - [Issue 1711] New: typeof with delegate literal not allowed as template parameter
- d-bugmail puremagic.com (33/33) Dec 02 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1711
- d-bugmail puremagic.com (9/9) Feb 16 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1711
http://d.puremagic.com/issues/show_bug.cgi?id=1711 Summary: typeof with delegate literal not allowed as template parameter Product: D Version: 2.008 Platform: PC OS/Version: Linux Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: dhasenan gmail.com template strof (T) { static string strof = T.stringof; } void main () { alias typeof(delegate () { return (invariant(char)[]).init;} ) del; // doesn't affect aliased type auto a = strof!(del); // doesn't affect non-delegate literal types auto aa = strof!(int); // doesn't affect non-delegates with typeof auto ab = strof!(typeof(5)); // doesn't affect typeof with assigned variable auto meth = delegate () { return (invariant(char)[]).init;}; auto b = strof!(typeof(meth)); // rejects with delegate literal in typeof -- both of the following fail auto c = strof!(typeof(delegate () { return 5; } )); auto d = strof!(typeof(delegate () { return (invariant(char)[]).init;} )); } --
Dec 02 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1711 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla digitalmars.com 2008-02-16 06:02 ------- Fixed dmd 1.026 and 2.010 --
Feb 16 2008