D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15155 - ')' cannot be expressed in code examples
Summary: ')' cannot be expressed in code examples
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ddoc, rejects-valid
Depends on:
Blocks:
 
Reported: 2015-10-04 19:24 UTC by Marco Leise
Modified: 2022-10-13 07:35 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Marco Leise 2015-10-04 19:24:53 UTC
/**---
  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 RazvanN 2022-10-13 07:35:21 UTC
Works for me when I use the `-D`. No warning and the output is fine.