www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22097] New: 1 should be promoted to long, instead of bool

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

          Issue ID: 22097
           Summary: 1 should be promoted to long, instead of bool
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ilyayaroshenko gmail.com

current code fails at runtime. 1 should be promoted to long, instead of bool

    static struct S
    {
        this(bool b)
        {
            assert(0);
        }

        this(long l)
        {

        }
    }
    auto ss = S(1);

--
Jul 02 2021