D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6491 - Fully qualified values in default arguments of non-template functions are generated with an extra 'module' keyword
Summary: Fully qualified values in default arguments of non-template functions are gen...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 minor
Assignee: No Owner
URL:
Keywords: ddoc, patch
Depends on:
Blocks:
 
Reported: 2011-08-14 09:08 UTC by kennytm
Modified: 2011-08-15 01:09 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 kennytm 2011-08-14 09:08:54 UTC
Example:

--------------------
/// test
void bug6491(string s = std.ascii.hexDigits) {}
--------------------

Generated DDoc will read:

--------------------
void bug6491(string s = module ascii.hexDigits);
    test
--------------------

The 'module' should not exist, it should read 'string s = std.ascii.hexDigits'. This can also be seen at http://d-programming-language.org/phobos/std_stream.html#EndianStream. The problem doesn't exist if the function is templated.
Comment 1 kennytm 2011-08-14 10:51:39 UTC
DMD pull #307.

https://github.com/D-Programming-Language/dmd/pull/307