www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20152] New: numeric expression should not evaluate to const

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

          Issue ID: 20152
           Summary: numeric expression should not evaluate to const type
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ilyayaroshenko gmail.com

void main()
{       
        const double a = 1, b = 2;
        pragma(msg, typeof(a * b));
}

prints `const(double)`

expected result: `double`

--
Aug 22 2019