Skip to content

Avoid using · character #14453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,27 @@ trait MessageRendering {
* ```
* Or if there `soft` is true,
* ```
* |···············
* |- - - - - - - -
* ```
*/
private def newBox(soft: Boolean = false)(using Context, Level, Offset): String =
val pageWidth = ctx.settings.pageWidth.value
val prefix = " " * (offset - 1)
val line = (if soft then "·" else "-") * (pageWidth - offset)
val lineWidth = (pageWidth - offset)
val line = if soft then ("- " * ((lineWidth + 1) / 2)).trim else "-" * lineWidth
hl(s"$prefix|$line")

/** The end of a box section
*
* ```
* ·----------------
* ----------------
* ```
*/
private def endBox(using Context, Level, Offset): String =
val pageWidth = ctx.settings.pageWidth.value
val prefix = " " * (offset - 1)
val line = "-" * (pageWidth - offset)
hl(s"${prefix}·$line")
hl(s"${prefix} $line")

/** The error message (`msg`) aligned under `pos`
*
Expand Down
8 changes: 4 additions & 4 deletions tests/neg-custom-args/i11637.check
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String] <: Set[T]] =>> Any
|--------------------------------------------------------------------------------------------------------------------
| Explanation (enabled by `-explain`)
|····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| I tried to show that
| test2.FunctorImpl
| conforms to
Expand All @@ -25,14 +25,14 @@
| <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
|
| The tests were made under the empty constraint
·--------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:21 ------------------------------------------------
11 | var h = new HKT3_1[FunctorImpl](); // error // error
| ^
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String] <: Set[T]] =>> Any
|--------------------------------------------------------------------------------------------------------------------
| Explanation (enabled by `-explain`)
|····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| I tried to show that
| test2.FunctorImpl
| conforms to
Expand All @@ -53,4 +53,4 @@
| <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false
|
| The tests were made under the empty constraint
·--------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
8 changes: 4 additions & 4 deletions tests/neg-macros/i11386.check
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
| test
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Test_2.scala:6
7 | notNull(i)
| ^^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
-- Error: tests/neg-macros/i11386/Test_2.scala:8:20 --------------------------------------------------------------------
8 | dummy(int2String(0)) // error
| ^^^^^^^^^^^^^
| test
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Test_2.scala:8
7 | notNull(i)
| ^^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions tests/neg-macros/i13991.check
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
| Error
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Test_2.scala:3
3 | inline def v2 = InlineMac.sample("foo")
| ^^^^^
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Test_2.scala:3
3 | inline def v2 = InlineMac.sample("foo")
| ^^^^^^^^^^^^^^^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions tests/neg-macros/i6976.check
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
|
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Macro_1.scala:6
6 | inline def mcr(x: => Any) = ${mcrImpl('x)}
| ^^^^^^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions tests/neg-macros/ill-abort.check
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
|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.
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from quoted_1.scala:3
3 |inline def fail(): Unit = ${ impl }
| ^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions tests/neg-macros/macro-class-not-found-1.check
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
|
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Foo.scala:5
5 | inline def myMacro(): Unit = ${ aMacroImplementation }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions tests/neg-macros/macro-class-not-found-2.check
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
|
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from Foo.scala:5
5 | inline def myMacro(): Unit = ${ aMacroImplementation }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions tests/neg/cannot-reduce-inline-match.check
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
| patterns : case _:Int
|---------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|·····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from cannot-reduce-inline-match.scala:3
3 | inline x match {
| ^
4 | case _: Int =>
5 | }
·---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions tests/neg/i11225.check
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
| `uninitialized` can only be used as the right hand side of a mutable field definition
|--------------------------------------------------------------------------------------------------------------------
|Inline stack trace
|····················································································································
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|This location contains code that was inlined from i11225.scala:25
25 | transparent inline def uni = uninitialized
| ^^^^^^^^^^^^^
·--------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
Loading