digitalmars.D.bugs - [Issue 974] New: compile-time parenthesis bug
- d-bugmail puremagic.com (33/33) Feb 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=974
- d-bugmail puremagic.com (9/9) Feb 26 2007 http://d.puremagic.com/issues/show_bug.cgi?id=974
- d-bugmail puremagic.com (6/6) Mar 11 2007 http://d.puremagic.com/issues/show_bug.cgi?id=974
http://d.puremagic.com/issues/show_bug.cgi?id=974 Summary: compile-time parenthesis bug Product: D Version: 1.006 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: Daniel919 web.de import std.stdio; template eval(A...) { alias A eval; } char[] trimfirst(char[] s) { int x = 0; foreach (char each; s) { if (each != ' ') //{ return s[x .. $]; //} //Without the parenthesis, the compile-time version doesn't work ! x++; } return s; } void main() { writefln(eval!(trimfirst(" test"))); //Output: " test" writefln(trimfirst(" test")); //Output: "test" } --
Feb 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=974 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed DMD 1.007 --
Feb 26 2007
http://d.puremagic.com/issues/show_bug.cgi?id=974 Added to DStress as http://dstress.kuehne.cn/run/i/interpret_01_A.d http://dstress.kuehne.cn/run/i/interpret_01_B.d --
Mar 11 2007