File tree 15 files changed +73
-72
lines changed
compiler/src/dotty/tools/dotc/reporting
15 files changed +73
-72
lines changed Original file line number Diff line number Diff line change @@ -116,26 +116,27 @@ trait MessageRendering {
116
116
* ```
117
117
* Or if there `soft` is true,
118
118
* ```
119
- * |···············
119
+ * |- - - - - - - -
120
120
* ```
121
121
*/
122
122
private def newBox (soft : Boolean = false )(using Context , Level , Offset ): String =
123
123
val pageWidth = ctx.settings.pageWidth.value
124
124
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
126
127
hl(s " $prefix| $line" )
127
128
128
129
/** The end of a box section
129
130
*
130
131
* ```
131
- * · ----------------
132
+ * ----------------
132
133
* ```
133
134
*/
134
135
private def endBox (using Context , Level , Offset ): String =
135
136
val pageWidth = ctx.settings.pageWidth.value
136
137
val prefix = " " * (offset - 1 )
137
138
val line = " -" * (pageWidth - offset)
138
- hl(s " ${prefix}· $line" )
139
+ hl(s " ${prefix} $line" )
139
140
140
141
/** The error message (`msg`) aligned under `pos`
141
142
*
Original file line number Diff line number Diff line change 4
4
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String] <: Set[T]] =>> Any
5
5
|--------------------------------------------------------------------------------------------------------------------
6
6
| Explanation (enabled by `-explain`)
7
- |····················································································································
7
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
8
8
| I tried to show that
9
9
| test2.FunctorImpl
10
10
| conforms to
25
25
| <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
26
26
|
27
27
| The tests were made under the empty constraint
28
- · --------------------------------------------------------------------------------------------------------------------
28
+ --------------------------------------------------------------------------------------------------------------------
29
29
-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:21 ------------------------------------------------
30
30
11 | var h = new HKT3_1[FunctorImpl](); // error // error
31
31
| ^
32
32
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String] <: Set[T]] =>> Any
33
33
|--------------------------------------------------------------------------------------------------------------------
34
34
| Explanation (enabled by `-explain`)
35
- |····················································································································
35
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36
36
| I tried to show that
37
37
| test2.FunctorImpl
38
38
| conforms to
53
53
| <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
54
54
|
55
55
| The tests were made under the empty constraint
56
- · --------------------------------------------------------------------------------------------------------------------
56
+ --------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 5
5
| test
6
6
|---------------------------------------------------------------------------------------------------------------------
7
7
|Inline stack trace
8
- |·····················································································································
8
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
9
|This location contains code that was inlined from Test_2.scala:6
10
10
7 | notNull(i)
11
11
| ^^^^^^^^^^
12
- · ---------------------------------------------------------------------------------------------------------------------
12
+ ---------------------------------------------------------------------------------------------------------------------
13
13
-- Error: tests/neg-macros/i11386/Test_2.scala:8:20 --------------------------------------------------------------------
14
14
8 | dummy(int2String(0)) // error
15
15
| ^^^^^^^^^^^^^
16
16
| test
17
17
|---------------------------------------------------------------------------------------------------------------------
18
18
|Inline stack trace
19
- |·····················································································································
19
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
20
|This location contains code that was inlined from Test_2.scala:8
21
21
7 | notNull(i)
22
22
| ^^^^^^^^^^
23
- · ---------------------------------------------------------------------------------------------------------------------
23
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 5
5
| Error
6
6
|---------------------------------------------------------------------------------------------------------------------
7
7
|Inline stack trace
8
- |·····················································································································
8
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
9
|This location contains code that was inlined from Test_2.scala:3
10
10
3 | inline def v2 = InlineMac.sample("foo")
11
11
| ^^^^^
12
- |·····················································································································
12
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13
13
|This location contains code that was inlined from Test_2.scala:3
14
14
3 | inline def v2 = InlineMac.sample("foo")
15
15
| ^^^^^^^^^^^^^^^^^^^^^^^
16
- · ---------------------------------------------------------------------------------------------------------------------
16
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 8
8
|
9
9
|---------------------------------------------------------------------------------------------------------------------
10
10
|Inline stack trace
11
- |·····················································································································
11
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
12
12
|This location contains code that was inlined from Macro_1.scala:6
13
13
6 | inline def mcr(x: => Any) = ${mcrImpl('x)}
14
14
| ^^^^^^^^^^^^^^
15
- · ---------------------------------------------------------------------------------------------------------------------
15
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 5
5
|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.
6
6
|---------------------------------------------------------------------------------------------------------------------
7
7
|Inline stack trace
8
- |·····················································································································
8
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
9
|This location contains code that was inlined from quoted_1.scala:3
10
10
3 |inline def fail(): Unit = ${ impl }
11
11
| ^^^^^^^^^
12
- · ---------------------------------------------------------------------------------------------------------------------
12
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 7
7
|
8
8
|---------------------------------------------------------------------------------------------------------------------
9
9
|Inline stack trace
10
- |·····················································································································
10
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11
11
|This location contains code that was inlined from Foo.scala:5
12
12
5 | inline def myMacro(): Unit = ${ aMacroImplementation }
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^
14
- · ---------------------------------------------------------------------------------------------------------------------
14
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 7
7
|
8
8
|---------------------------------------------------------------------------------------------------------------------
9
9
|Inline stack trace
10
- |·····················································································································
10
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
11
11
|This location contains code that was inlined from Foo.scala:5
12
12
5 | inline def myMacro(): Unit = ${ aMacroImplementation }
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^
14
- · ---------------------------------------------------------------------------------------------------------------------
14
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 6
6
| patterns : case _:Int
7
7
|---------------------------------------------------------------------------------------------------------------------
8
8
|Inline stack trace
9
- |·····················································································································
9
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10
10
|This location contains code that was inlined from cannot-reduce-inline-match.scala:3
11
11
3 | inline x match {
12
12
| ^
13
13
4 | case _: Int =>
14
14
5 | }
15
- · ---------------------------------------------------------------------------------------------------------------------
15
+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 44
44
| `uninitialized` can only be used as the right hand side of a mutable field definition
45
45
|--------------------------------------------------------------------------------------------------------------------
46
46
|Inline stack trace
47
- |····················································································································
47
+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
48
48
|This location contains code that was inlined from i11225.scala:25
49
49
25 | transparent inline def uni = uninitialized
50
50
| ^^^^^^^^^^^^^
51
- · --------------------------------------------------------------------------------------------------------------------
51
+ --------------------------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments