http://d.puremagic.com/issues/show_bug.cgi?id=10560

           Summary: Enum typed as int with value equal to 0 or 1 prefer
                    bool over int overload
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-07-06 14:24:31 PDT ---
import std.stdio;

void foo(bool b) { writeln("bool"); }
void foo(int i) { writeln("int"); }

enum Boo : int {
  a = 1,
  b = 2,
}

void main() {
  foo(Boo.a); //prints 'bool', should print int
  foo(Boo.b); //prints 'int' correctly
}

This issue is related to http://d.puremagic.com/issues/show_bug.cgi?id=9999

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to