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
Use precedence levels properly when printing infix types
This way, printing an infix type need not inspect its arguments; that ensures we
don't need to handle *all* the possible forms of types that need to be wrapped
in parentheses.
I did this purely as a refactoring, based on how pretty-printers are supposed to
be written. But the new test case, combining infix type operators and builting
connectives, didn't work with the old code. It also doesn't work in Scala 2:
```scala
Welcome to Scala 2.12.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_172).
Type in expressions for evaluation. Or try :help.
scala> class &&[T,U]
defined class $amp$amp
scala> def foo: Int && Boolean = ???
foo: Int && Boolean
scala> def foo: Int && Boolean with String = ???
foo: Int && Boolean with String
scala> def foo: Int && (Boolean with String) = ???
foo: Int && Boolean with String
scala> def foo: (Int && Boolean) with String = ???
foo: Int && Boolean with String
```
0 commit comments