[Issue 15170] New: default arguments from expression tuple don't work

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Oct 7 01:32:17 PDT 2015


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

          Issue ID: 15170
           Summary: default arguments from expression tuple don't work
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

alias Tuple(Stuff...) = Stuff;
void foo(Tuple!(int, float) args = Tuple!(1, 2f)) {}
void main()
{
    foo(1, 2); /* accepted */
    foo(); /* Error: function test.foo (int _param_0, float _param_1) is not
callable using argument types () */
}

--


More information about the Digitalmars-d-bugs mailing list