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

          Issue ID: 12675
           Summary: alias parameter with a specAlias which is a type is
                    not properly implemented
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

-----
template TemplType(
    /* alias */ TypeParamSpecType : int
) { }

template TemplAlias(
    alias AliasParamSpecType : int
) { }

void main()
{
    alias a = TemplType!int;   // ok
    alias b = TemplAlias!int;  // error
}
-----

Note that it works when specAlias is a value and not a type:

-----
template TemplValue(
    int x : 2
) { }

template TemplAlias(
    alias x : 2
) { }

void main()
{
    alias a = TemplValue!2;   // ok
    alias b = TemplAlias!2;  // ok
}
-----

--

Reply via email to