[Issue 17378] New: Allow multiple arguments for assert and static assert

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 7 02:19:46 PDT 2017


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

          Issue ID: 17378
           Summary: Allow multiple arguments for assert and static assert
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: acehreli at yahoo.com

This is for consistency with pragma(msg) and developer and build efficiency
(because std.string.format would not be needed anymore).

void main() {
    pragma(msg, "hi ", 42);
    // static assert(false, "wat ", 43);
    // assert(false, "why ", 44);
}

The commented-out lines should be compilable and output "wat 43" and "why 44"
respectively.

Ali

--


More information about the Digitalmars-d-bugs mailing list