Bug 4878 – Ddoc: Default arguments can break Ddoc output

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-09-17T07:15:00Z
Last change time
2015-06-09T05:10:38Z
Keywords
patch
Assigned to
nobody
Creator
johannespfau

Attachments

IDFilenameSummaryContent-TypeSize
757testcase.dtest casetext/x-dsrc238
758ddoc.patchPatch for dmd 2.049text/plain2447

Comments

Comment #0 by johannespfau — 2010-09-17T07:15:37Z
Created attachment 757 test case String default arguments of functions can still break the Ddoc output. Example: ///a stray $(RPAREN) void test(string a = ")") {}
Comment #1 by johannespfau — 2010-09-17T07:18:53Z
Created attachment 758 Patch for dmd 2.049
Comment #2 by johannespfau — 2010-09-17T07:24:04Z
Note: Phobos has workarounds for this issue in std.random, line 642 and 728 (svn, revision 1977). These workarounds need to be revoked because this patch preserves string arguments literally and therefore macros are not expanded (which is the right thing, imho).
Comment #3 by clugdbug — 2011-02-06T13:46:46Z