[Issue 21804] New: Type list (tuple) not expanded in delegate during IFTI

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 6 07:24:01 UTC 2021


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

          Issue ID: 21804
           Summary: Type list (tuple) not expanded in delegate during IFTI
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dlang-bugzilla at thecybershadow.net

//////////////////// test.d ////////////////////
alias AliasSeq(TList...) = TList;

void main()
{
    struct S { void m() {} }
    alias Args = AliasSeq!(S);

    void fun(R)(R delegate(Args) dg)
    {
    }

    fun!void((result) { result.m(); }); // OK
    fun     ((result) { result.m(); }); // error
}
////////////////////////////////////////////////

In the second case, `result` is a tuple containing an `S`, which doesn't seem
right.

--


More information about the Digitalmars-d-bugs mailing list