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

          Issue ID: 13010
           Summary: Use variable range propagation (VRP) for static assert
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

This code should work:

void testvrp(ubyte l)
{
  immutable int i = l;
  static assert(i + 1);
}

--

Reply via email to