Commit a9032b0
committed
SI-4700 Types with symbolic names print in infix by default
This a partial port of scala/scala#5589 to
dotty: when pretty-printing an applied type, if its type constructor has
a symbolic name, then always print it in infix form. The PR in scalac
also adds an `@showAsInfix` annotation to control this behavior, but we
cannot do the same in dotty since we still rely on the standard library
from Scala 2.11 and the annotation only exists in 2.12 and up.1 parent e6be996 commit a9032b0
File tree
2 files changed
+42
-0
lines changed- compiler/src/dotty/tools/dotc/printing
- tests/repl
2 files changed
+42
-0
lines changedLines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
127 | 149 | | |
128 | 150 | | |
129 | 151 | | |
| |||
132 | 154 | | |
133 | 155 | | |
134 | 156 | | |
| 157 | + | |
135 | 158 | | |
136 | 159 | | |
137 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments