www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17983] New: Integer literal should prefer int to char overload

https://issues.dlang.org/show_bug.cgi?id=17983

          Issue ID: 17983
           Summary: Integer literal should prefer int to char overload
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: nick geany.org

alias foo = (char c) => 1;
alias foo = (int i) => 4;

enum int e = 7;
static assert(foo(e) == 4); // fails

--
Nov 14