[Issue 12675] New: alias parameter with a specAlias which is a type is not properly implemented
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Apr 28 11:52:19 PDT 2014
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: nobody at puremagic.com
Reporter: andrej.mitrovich at gmail.com
-----
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
}
-----
--
More information about the Digitalmars-d-bugs
mailing list