Skip to content

Commit 2e78ecf

Browse files
committed
Avoid using · character
1 parent ddac928 commit 2e78ecf

15 files changed

+73
-72
lines changed

compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,26 +116,27 @@ trait MessageRendering {
116116
* ```
117117
* Or if there `soft` is true,
118118
* ```
119-
* |···············
119+
* |- - - - - - - -
120120
* ```
121121
*/
122122
private def newBox(soft: Boolean = false)(using Context, Level, Offset): String =
123123
val pageWidth = ctx.settings.pageWidth.value
124124
val prefix = " " * (offset - 1)
125-
val line = (if soft then "·" else "-") * (pageWidth - offset)
125+
val lineWidth = (pageWidth - offset)
126+
val line = if soft then ("- " * ((lineWidth + 1) / 2)).trim else "-" * lineWidth
126127
hl(s"$prefix|$line")
127128

128129
/** The end of a box section
129130
*
130131
* ```
131-
* ·----------------
132+
* ----------------
132133
* ```
133134
*/
134135
private def endBox(using Context, Level, Offset): String =
135136
val pageWidth = ctx.settings.pageWidth.value
136137
val prefix = " " * (offset - 1)
137138
val line = "-" * (pageWidth - offset)
138-
hl(s"${prefix}·$line")
139+
hl(s"${prefix} $line")
139140

140141
/** The error message (`msg`) aligned under `pos`
141142
*

tests/neg-custom-args/i11637.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String] <: Set[T]] =>> Any
55
|--------------------------------------------------------------------------------------------------------------------
66
| Explanation (enabled by `-explain`)
7-
|····················································································································
7+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
88
| I tried to show that
99
| test2.FunctorImpl
1010
| conforms to
@@ -25,14 +25,14 @@
2525
| <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
2626
|
2727
| The tests were made under the empty constraint
28-
·--------------------------------------------------------------------------------------------------------------------
28+
--------------------------------------------------------------------------------------------------------------------
2929
-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:21 ------------------------------------------------
3030
11 | var h = new HKT3_1[FunctorImpl](); // error // error
3131
| ^
3232
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String] <: Set[T]] =>> Any
3333
|--------------------------------------------------------------------------------------------------------------------
3434
| Explanation (enabled by `-explain`)
35-
|····················································································································
35+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3636
| I tried to show that
3737
| test2.FunctorImpl
3838
| conforms to
@@ -53,4 +53,4 @@
5353
| <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
5454
|
5555
| The tests were made under the empty constraint
56-
·--------------------------------------------------------------------------------------------------------------------
56+
--------------------------------------------------------------------------------------------------------------------

tests/neg-macros/i11386.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
| test
66
|---------------------------------------------------------------------------------------------------------------------
77
|Inline stack trace
8-
|·····················································································································
8+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99
|This location contains code that was inlined from Test_2.scala:6
1010
7 | notNull(i)
1111
| ^^^^^^^^^^
12-
·---------------------------------------------------------------------------------------------------------------------
12+
---------------------------------------------------------------------------------------------------------------------
1313
-- Error: tests/neg-macros/i11386/Test_2.scala:8:20 --------------------------------------------------------------------
1414
8 | dummy(int2String(0)) // error
1515
| ^^^^^^^^^^^^^
1616
| test
1717
|---------------------------------------------------------------------------------------------------------------------
1818
|Inline stack trace
19-
|·····················································································································
19+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2020
|This location contains code that was inlined from Test_2.scala:8
2121
7 | notNull(i)
2222
| ^^^^^^^^^^
23-
·---------------------------------------------------------------------------------------------------------------------
23+
---------------------------------------------------------------------------------------------------------------------

tests/neg-macros/i13991.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
| Error
66
|---------------------------------------------------------------------------------------------------------------------
77
|Inline stack trace
8-
|·····················································································································
8+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99
|This location contains code that was inlined from Test_2.scala:3
1010
3 | inline def v2 = InlineMac.sample("foo")
1111
| ^^^^^
12-
|·····················································································································
12+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1313
|This location contains code that was inlined from Test_2.scala:3
1414
3 | inline def v2 = InlineMac.sample("foo")
1515
| ^^^^^^^^^^^^^^^^^^^^^^^
16-
·---------------------------------------------------------------------------------------------------------------------
16+
---------------------------------------------------------------------------------------------------------------------

tests/neg-macros/i6976.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
|
99
|---------------------------------------------------------------------------------------------------------------------
1010
|Inline stack trace
11-
|·····················································································································
11+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1212
|This location contains code that was inlined from Macro_1.scala:6
1313
6 | inline def mcr(x: => Any) = ${mcrImpl('x)}
1414
| ^^^^^^^^^^^^^^
15-
·---------------------------------------------------------------------------------------------------------------------
15+
---------------------------------------------------------------------------------------------------------------------

tests/neg-macros/ill-abort.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
|Macro expansion was aborted by the macro without any errors reported. Macros should issue errors to end-users to facilitate debugging when aborting a macro expansion.
66
|---------------------------------------------------------------------------------------------------------------------
77
|Inline stack trace
8-
|·····················································································································
8+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99
|This location contains code that was inlined from quoted_1.scala:3
1010
3 |inline def fail(): Unit = ${ impl }
1111
| ^^^^^^^^^
12-
·---------------------------------------------------------------------------------------------------------------------
12+
---------------------------------------------------------------------------------------------------------------------

tests/neg-macros/macro-class-not-found-1.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
|
88
|---------------------------------------------------------------------------------------------------------------------
99
|Inline stack trace
10-
|·····················································································································
10+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1111
|This location contains code that was inlined from Foo.scala:5
1212
5 | inline def myMacro(): Unit = ${ aMacroImplementation }
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^
14-
·---------------------------------------------------------------------------------------------------------------------
14+
---------------------------------------------------------------------------------------------------------------------

tests/neg-macros/macro-class-not-found-2.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
|
88
|---------------------------------------------------------------------------------------------------------------------
99
|Inline stack trace
10-
|·····················································································································
10+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1111
|This location contains code that was inlined from Foo.scala:5
1212
5 | inline def myMacro(): Unit = ${ aMacroImplementation }
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^
14-
·---------------------------------------------------------------------------------------------------------------------
14+
---------------------------------------------------------------------------------------------------------------------

tests/neg/cannot-reduce-inline-match.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
| patterns : case _:Int
77
|---------------------------------------------------------------------------------------------------------------------
88
|Inline stack trace
9-
|·····················································································································
9+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1010
|This location contains code that was inlined from cannot-reduce-inline-match.scala:3
1111
3 | inline x match {
1212
| ^
1313
4 | case _: Int =>
1414
5 | }
15-
·---------------------------------------------------------------------------------------------------------------------
15+
---------------------------------------------------------------------------------------------------------------------

tests/neg/i11225.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
| `uninitialized` can only be used as the right hand side of a mutable field definition
4545
|--------------------------------------------------------------------------------------------------------------------
4646
|Inline stack trace
47-
|····················································································································
47+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4848
|This location contains code that was inlined from i11225.scala:25
4949
25 | transparent inline def uni = uninitialized
5050
| ^^^^^^^^^^^^^
51-
·--------------------------------------------------------------------------------------------------------------------
51+
--------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)