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: nob...@puremagic.com ReportedBy: thecybersha...@gmail.com --- Comment #0 from Vladimir <thecybersha...@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: -------