Open WojciechMazur opened 1 month ago
I think it's a corner case. We don't want to always add the parentheses, since that would clutter source and in 99.9% they are not needed. We could make it context dependent, at great expense. But I think it's actually a viable option to keep the current behavior and demand a manual fix afterwards.
Compiler version
All Scala versions since 3.4.0
Minimized code
Output
Rewrites
R0 with R1 <:< R
toR0 & R1 <:< R
. However it's interpreted differently:R0 with R1 <:< R
===(R0 & R1) <:< R
R0 & R1 <:< R
===R0 & (R1 <:< R)
Expectation
The compiler should either treat the symbolic
&
in the same as thewith
symbol, or it should introduce parenthesis when rewriting symbols.