Bug 12383 – dlang.org operator overloading text with DDoc macro.

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-16T09:42:00Z
Last change time
2017-07-19T05:23:43Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
philippe.sigaud
See also
https://issues.dlang.org/show_bug.cgi?id=13211

Comments

Comment #0 by philippe.sigaud — 2014-03-16T09:42:57Z
The binary op overloading on dlang.org has a problem: http://dlang.org/operatoroverloading.html#Binary ~~~~~~ The expression: a op b is rewritten as both: a.opBinary!("$(METACODE op)")(b) b.opBinaryRight!("$(METACODE op)")(a) and the one with the ‘better’ match is selected. It is an error for both to equally match. ~~~~~~~ The "$(METACODE op)" part should not appear as such.
Comment #1 by alix.pexton — 2014-04-21T11:29:48Z
This occurs every time that the METACODE macro appears directly inside quotes, therefore it might actually be considered a bug in DDoc (I don't see anything in the documentation for macros that says macros are treated differently when they appear in quotes). Perhaps in cases like this the macro should be placed inside another macro that add the quotes, so "($METACODE op)" becomes ($q (($METACODE op)) where q = $0
Comment #2 by ag0aep6g — 2016-02-17T22:26:38Z
*** This issue has been marked as a duplicate of issue 13373 ***