D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14067 - template parameters of enum type in DDoc are broken
Summary: template parameters of enum type in DDoc are broken
Status: RESOLVED DUPLICATE of issue 8044
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ddoc
Depends on:
Blocks:
 
Reported: 2015-01-28 13:21 UTC by sinkuupump
Modified: 2020-10-10 00:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sinkuupump 2015-01-28 13:21:48 UTC
# 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( /* ... */ );
Comment 1 Mathias LANG 2020-10-10 00:11:11 UTC
Nice find. Yes the formatting is utterly broken. Technically, this is a duplicate of 8044, for which I just opened a PR for.

*** This issue has been marked as a duplicate of issue 8044 ***