File tree Expand file tree Collapse file tree 15 files changed +73
-72
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 15 files changed +73
-72
lines changed Original file line number Diff line number Diff 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 *
Original file line number Diff line number Diff line change 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
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 ------------------------------------------------
303011 | 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
5353 | <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
5454 |
5555 | The tests were made under the empty constraint
56- · --------------------------------------------------------------------------------------------------------------------
56+ --------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 55 | test
66 |---------------------------------------------------------------------------------------------------------------------
77 |Inline stack trace
8- |·····················································································································
8+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99 |This location contains code that was inlined from Test_2.scala:6
10107 | notNull(i)
1111 | ^^^^^^^^^^
12- · ---------------------------------------------------------------------------------------------------------------------
12+ ---------------------------------------------------------------------------------------------------------------------
1313-- Error: tests/neg-macros/i11386/Test_2.scala:8:20 --------------------------------------------------------------------
14148 | 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
21217 | notNull(i)
2222 | ^^^^^^^^^^
23- · ---------------------------------------------------------------------------------------------------------------------
23+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 55 | Error
66 |---------------------------------------------------------------------------------------------------------------------
77 |Inline stack trace
8- |·····················································································································
8+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99 |This location contains code that was inlined from Test_2.scala:3
10103 | inline def v2 = InlineMac.sample("foo")
1111 | ^^^^^
12- |·····················································································································
12+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1313 |This location contains code that was inlined from Test_2.scala:3
14143 | inline def v2 = InlineMac.sample("foo")
1515 | ^^^^^^^^^^^^^^^^^^^^^^^
16- · ---------------------------------------------------------------------------------------------------------------------
16+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 88 |
99 |---------------------------------------------------------------------------------------------------------------------
1010 |Inline stack trace
11- |·····················································································································
11+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1212 |This location contains code that was inlined from Macro_1.scala:6
13136 | inline def mcr(x: => Any) = ${mcrImpl('x)}
1414 | ^^^^^^^^^^^^^^
15- · ---------------------------------------------------------------------------------------------------------------------
15+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 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
10103 |inline def fail(): Unit = ${ impl }
1111 | ^^^^^^^^^
12- · ---------------------------------------------------------------------------------------------------------------------
12+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 77 |
88 |---------------------------------------------------------------------------------------------------------------------
99 |Inline stack trace
10- |·····················································································································
10+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1111 |This location contains code that was inlined from Foo.scala:5
12125 | inline def myMacro(): Unit = ${ aMacroImplementation }
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^
14- · ---------------------------------------------------------------------------------------------------------------------
14+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 77 |
88 |---------------------------------------------------------------------------------------------------------------------
99 |Inline stack trace
10- |·····················································································································
10+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1111 |This location contains code that was inlined from Foo.scala:5
12125 | inline def myMacro(): Unit = ${ aMacroImplementation }
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^
14- · ---------------------------------------------------------------------------------------------------------------------
14+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 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
11113 | inline x match {
1212 | ^
13134 | case _: Int =>
14145 | }
15- · ---------------------------------------------------------------------------------------------------------------------
15+ ---------------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 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
494925 | transparent inline def uni = uninitialized
5050 | ^^^^^^^^^^^^^
51- · --------------------------------------------------------------------------------------------------------------------
51+ --------------------------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments