http://d.puremagic.com/issues/show_bug.cgi?id=8289
Summary: Cannot declare functions returning anonymous enum if they have 'in' block. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: mp8...@rambler.ru --- Comment #0 from Michele Pes <mp8...@rambler.ru> 2012-06-23 07:11:50 PDT --- import std.stdio; enum { A, B }; /* If I replace the return type int with enum, doesn't compile. If I remove the in/body blocks and declare a contractless f, both enum/int are ok. */ int dummy(in int i) in { assert(i > 0); } body { return A; } void main() { immutable x = dummy(0); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------