November 13, 2023
https://issues.dlang.org/show_bug.cgi?id=24241

          Issue ID: 24241
           Summary: Uncaught Default argument error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: aliloko@gmail.com

Created attachment 1899
  --> https://issues.dlang.org/attachment.cgi?id=1899&action=edit
source file

Consider the following D program:

------------------- main.d --------------

// Here `d` should have a default argument value too.
// Will DMD catch it?

ubyte lookup_decoding(char c = '/', bool d)
{
    return (c + d) & 255;
}

void main(string[] args)
{
    lookup_decoding(1, true);
}

------------------------------------------ 


This build OK with DMD 2.104.0
This doesn't build with DMD 2.100.0

Making it very easy to use default argument incorectly.

--