Bug 4431 – Template favors alias parameter for struct
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-07-06T04:25:00Z
Last change time
2016-03-18T12:24:56Z
Assigned to
nobody
Creator
simen.kjaras
Comments
Comment #0 by simen.kjaras — 2010-07-06T04:25:34Z
template isType( T ) {
enum isType = true;
}
template isType( alias T ) {
enum isType = false;
}
struct S {
alias int foo;
}
static assert( isType!S ); // fails
Testing shows that the latter isType definition is chosen.
Comment #1 by lt.infiltrator — 2014-03-18T23:12:45Z
Why is this a bug?
Comment #2 by k.hara.pg — 2016-03-18T12:24:56Z
*** This issue has been marked as a duplicate of issue 1659 ***