www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20846] New: Using previous arguments in default values

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

          Issue ID: 20846
           Summary: Using previous arguments in default values
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: porton narod.ru

I propose to make this compilable:

void f(int a, int b=a) { }

and even this:

void f(int a, int b=a*a) { }

--
May 19