[Issue 16472] New: template alias parameter bug
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 6 05:30:46 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16472
Issue ID: 16472
Summary: template alias parameter bug
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: turkeyman at gmail.com
template E(F){
enum E {
K = F(1)
}
}
struct S(F = float, alias e_ = E!double.K) {}
S!float x; // Error: E!double.K is used as a type
alias T = E!double.K;
struct S2(F = float, alias e_ = T) {}
S2!float y; // alias makes it okay...
struct S3(F = float, alias e_ = (E!double.K)) {}
S3!float z; // just putting parens make it okay as well... wat!?
This can't be right... right?
No problem if E is not a template.
--
More information about the Digitalmars-d-bugs
mailing list