[Issue 12074] New: Add BlockStatement to TemplateSingleArgument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 4 03:03:43 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12074

           Summary: Add BlockStatement to TemplateSingleArgument
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-02-04 13:03:40 EET ---
Currently, this is forbidden, both by the specification and implementation:

int call(alias fun)()
{
    return fun();
}

int main()
{
    return call!{ return 5; }();
}

It seems unambiguous, so I see no reason why it should not be allowed.

Perhaps the same idea applies to array/AA literals.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list