You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on code inspection, it seems like both RenderReference and ReferenceShower (which should disappear in #4954) ignore precedence: you'd get A & B => C from both (A & B) => C and A & (B => C), and one would have have similar issues whenever combining operators with different precedence.
I confirmed this by compiling the following source (placed in dotty/doc-tool/src/dotty/tools/dottydoc/model/TestDoc.scala), running dotty-doc/genDocs, and then opening dotty/docs/_site/api/dotty/tools/dottydoc/model/TestDoc.html (search didn't find that file, somehow, not sure how I should run doc generation).
Since this code is easier to test before producing the HTML (as done in https://github.com/lampepfl/dotty/pull/4954/files#diff-163c987fd3c448d3726f1715eb6a05cd), I'd think about adding a ParensReference node, that is rendered by simply adding parentheses around the node. I'd keep that separate from unary tuples, in case different formatting is needed and/or Dotty does add unary tuples (as Martin seems to have mentioned).
Uh oh!
There was an error while loading. Please reload this page.
Based on code inspection, it seems like both
RenderReference
andReferenceShower
(which should disappear in #4954) ignore precedence: you'd getA & B => C
from both(A & B) => C
andA & (B => C)
, and one would have have similar issues whenever combining operators with different precedence.I confirmed this by compiling the following source (placed in
dotty/doc-tool/src/dotty/tools/dottydoc/model/TestDoc.scala
), runningdotty-doc/genDocs
, and then openingdotty/docs/_site/api/dotty/tools/dottydoc/model/TestDoc.html
(search didn't find that file, somehow, not sure how I should run doc generation).The text was updated successfully, but these errors were encountered: