www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20045] New: bogus error: "integer constant expression

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

          Issue ID: 20045
           Summary: bogus error: "integer constant expression expected
                    instead of (uint).sizeof"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ag0aep6g gmail.com

Should compile:

alias U = const ubyte[uint.sizeof]*;

Currently gives: "Error: integer constant expression expected instead of
(uint).sizeof"

Tested with DMD64 D Compiler v2.087.0.

--
Jul 13 2019