[Issue 16020] New: AliasDeclarationY doesn't allow to alias a function type

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu May 12 03:40:15 PDT 2016


          Issue ID: 16020
           Summary: AliasDeclarationY doesn't allow to alias a function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com

std.typecons contains a load of C-ish alias declarations in the unittests.

The problem here is the new syntax that doesn't allow to declare the equivalent
without typing a silly declaration:

for example in typecons:

    alias int F1();

the only way to get the same type alias using the most modern syntax is

    import std.traits;
    alias F1 = PointerTarget!(int function());


    alias F1 = int();

is not allowed at all.

There's a **gap** because now we can't say "let's drop the old alias syntax


More information about the Digitalmars-d-bugs mailing list