[Issue 14067] New: template parameters of enum type in DDoc are broken
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jan 28 05:21:48 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14067
Issue ID: 14067
Summary: template parameters of enum type in DDoc are broken
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ddoc
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: sinkuupump at gmail.com
# Code:
enum E { a }
void fun(E e)()
{
}
///
alias FA = fun!(E.a);
struct S(E e) {}
///
alias SA = S!(E.a);
// stringof property
static assert(S!(E.a).stringof == "S!(E.a)"); // fail - stringof is
"S!cast(E)0"
# Output of `dmd -D`:
alias FA = fun!cast(E)0.fun;
alias SA = S!cast(E)0.S;
Expected result is "fun!(E.a).fun". At least it should be "fun!(cast(E)0).fun"
std.experimental.logger documentation is broken due to this bug.
eg. http://dlang.org/phobos-prerelease/std_experimental_logger_core.html#.trace
alias trace =
defaultLogFunction!cast(LogLevel)cast(ubyte)32u.defaultLogFunction( /* ... */
);
--
More information about the Digitalmars-d-bugs
mailing list