digitalmars.D.bugs - [Issue 5526] New: Static templated functions don't work with CTFE
- d-bugmail puremagic.com (36/36) Feb 05 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5526
- d-bugmail puremagic.com (12/12) Feb 16 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5526
http://d.puremagic.com/issues/show_bug.cgi?id=5526 Summary: Static templated functions don't work with CTFE Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: thecybershadow gmail.com --- Comment #0 from Vladimir <thecybershadow gmail.com> 2011-02-05 01:15:15 PST --- string g(string who)() { return "Hello, "~who~"!"; } struct S { static string f () { return "Hello, world!"; } static string g(string who)() { return "Hello, "~who~"!"; } } void main() { pragma(msg, S.f()); // works pragma(msg, g!("world")()); // works pragma(msg, S.g!("world")()); // doesn't work } === Compiler output === $ dmd test.d Hello, world! Hello, world! test.d(13): Error: Cannot interpret S at compile time test.d(13): Error: cannot evaluate (S , g)() at compile time (S , g)() -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5526 Vladimir <thecybershadow gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE --- Comment #1 from Vladimir <thecybershadow gmail.com> 2011-02-16 15:40:22 PST --- Oops, I stumbled upon the exact same bug a while ago. *** This issue has been marked as a duplicate of issue 3959 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 16 2011