Thread overview |
---|
February 17, 2007 [Issue 974] New: compile-time parenthesis bug | ||||
---|---|---|---|---|
| ||||
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" } -- |
February 27, 2007 [Issue 974] compile-time parenthesis bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=974 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2007-02-26 19:26 ------- Fixed DMD 1.007 -- |
March 11, 2007 [Issue 974] compile-time parenthesis bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=974 ------- Comment #2 from thomas-dloop@kuehne.cn 2007-03-11 06:20 ------- Added to DStress as http://dstress.kuehne.cn/run/i/interpret_01_A.d http://dstress.kuehne.cn/run/i/interpret_01_B.d -- |
Copyright © 1999-2021 by the D Language Foundation