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

--- Comment #0 from Michele Pes <> 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
int dummy(in int i)
in {
    assert(i > 0);
body {
    return A;

void main()
    immutable x = dummy(0);

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to