www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16020] New: AliasDeclarationY doesn't allow to alias a


          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 puremagic.com
          Reporter: b2.temp 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

May 12 2016