Bug 15155 – ')' cannot be expressed in code examples

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-04T19:24:53Z
Last change time
2022-10-13T07:35:21Z
Keywords
ddoc, rejects-valid
Assigned to
No Owner
Creator
Marco Leise
See also
https://issues.dlang.org/show_bug.cgi?id=15122

Comments

Comment #0 by Marco.Leise — 2015-10-04T19:24:53Z
/**--- char c = ')'; ---*/ void main() {} DMD: "Warning: Ddoc: Stray ')'. This may cause incorrect Ddoc output. Use $(RPAREN) instead for unpaired right parentheses." Me: "But it is a code example!? Well then ..." /**--- char c = '$(RPAREN)'; ---*/ void main() {} Me: "But stop warning me now, ok?" DMD: "Error: unterminated character constant" Me: ":-( sarcasm is the dark side of humor, DMD"
Comment #1 by razvan.nitu1305 — 2022-10-13T07:35:21Z
Works for me when I use the `-D`. No warning and the output is fine.