From 81d454f8b220f2a29ceb6956627f127d10832414 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Thu, 25 Nov 2021 13:28:19 +0100 Subject: [PATCH] Improve -explain rendering --- .../dotc/reporting/ConsoleReporter.scala | 4 - .../dotc/reporting/MessageRendering.scala | 14 ++ .../tools/dotc/typer/ErrorReporting.scala | 9 +- compiler/test-resources/repl/errmsgs | 52 +++++-- .../test-resources/repl/i13208.default.scala | 4 +- compiler/test-resources/repl/i2063 | 12 +- compiler/test-resources/repl/i2213 | 4 +- compiler/test-resources/repl/i4217 | 4 +- compiler/test-resources/repl/i4566 | 4 +- compiler/test-resources/repl/i7644 | 8 +- compiler/test-resources/repl/importFromObj | 4 +- compiler/test-resources/repl/notFound | 8 +- compiler/test-resources/repl/nowarn.scala | 12 +- compiler/test-resources/repl/overrides | 8 +- compiler/test-resources/repl/reset-command | 4 +- .../test-resources/type-printer/type-mismatch | 4 +- .../explicit-nulls/byname-nullables.check | 5 +- .../explicit-nulls/i7883.check | 10 +- tests/neg-custom-args/i11637.check | 97 ++++++------ tests/neg-custom-args/i13026.check | 10 +- tests/neg-custom-args/i13838.check | 5 +- tests/neg-custom-args/jdk-9-app.check | 5 +- .../kind-projector-underscores.check | 10 +- .../nowarn/nowarn-parser-error.check | 10 +- .../nowarn/nowarn-typer-error.check | 5 +- tests/neg-custom-args/nowarn/nowarn.check | 30 ++-- .../beta-reduce-inline-result.check | 5 +- tests/neg-macros/i6436.check | 5 +- .../type-splice-in-val-pattern.check | 5 +- .../jsconstructorof-error-in-typer.check | 15 +- tests/neg-scalajs/type-mismatch.check | 5 +- tests/neg/3559d.check | 5 +- tests/neg/6697.check | 5 +- tests/neg/EmptyCaseClassParams.check | 15 +- tests/neg/EmptyEnum.check | 5 +- tests/neg/SummonFrom.check | 10 +- tests/neg/abstract-givens.check | 5 +- tests/neg/ambiref.check | 20 ++- tests/neg/annot-printing.check | 5 +- tests/neg/bad-unapplies.check | 30 ++-- tests/neg/enumWithType.check | 5 +- tests/neg/i10268.check | 5 +- tests/neg/i10757.check | 5 +- tests/neg/i11437.check | 5 +- tests/neg/i11544.check | 5 +- tests/neg/i11561.check | 5 +- tests/neg/i12049.check | 5 +- tests/neg/i12150.check | 10 +- tests/neg/i12284.check | 5 +- tests/neg/i13435.check | 5 +- tests/neg/i13769.check | 5 +- tests/neg/i13960.check | 5 +- tests/neg/i2033.check | 5 +- tests/neg/i4382.check | 20 ++- tests/neg/i5101.check | 5 +- tests/neg/i5311.check | 5 +- tests/neg/i6183.check | 5 +- tests/neg/i6205.check | 5 +- tests/neg/i6762b.check | 5 +- tests/neg/i6779.check | 10 +- tests/neg/i7195.check | 5 +- tests/neg/i7359-g.check | 5 +- tests/neg/i8569.check | 5 +- tests/neg/i8569a.check | 5 +- tests/neg/i8623.check | 5 +- tests/neg/i8736.check | 15 +- tests/neg/i8752.check | 5 +- tests/neg/i8988.check | 5 +- tests/neg/i9436.check | 5 +- tests/neg/i9437.check | 5 +- tests/neg/i9803.check | 5 +- tests/neg/i9958.check | 5 +- tests/neg/if-error.check | 5 +- tests/neg/kinds2.check | 5 +- tests/neg/leading-infix-miss.check | 5 +- tests/neg/matchtype-seq.check | 145 +++++++++++------- tests/neg/missing-implicit-2.check | 5 +- tests/neg/missing-implicit-3.check | 5 +- tests/neg/module-class-name.check | 20 ++- tests/neg/multi-file-error.check | 10 +- tests/neg/print-infix-type.check | 5 +- tests/neg/singleton-ops-any.check | 30 ++-- tests/neg/spaces-vs-tabs.check | 5 +- tests/neg/splice-pat.check | 5 +- tests/neg/t6124.check | 5 +- tests/neg/t6663.check | 5 +- 86 files changed, 567 insertions(+), 360 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala index f872968006b0..0d2292318a71 100644 --- a/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala +++ b/compiler/src/dotty/tools/dotc/reporting/ConsoleReporter.scala @@ -32,10 +32,6 @@ object ConsoleReporter { /** Prints the message with the given position indication. */ def doReport(dia: Diagnostic)(using Context): Unit = { printMessage(messageAndPos(dia)) - if Diagnostic.shouldExplain(dia) then - printMessage(explanation(dia.msg)) - else if dia.msg.canExplain then - printMessage("\nlonger explanation available when compiling with `-explain`") } } } diff --git a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala index 1cc98cf75898..17080d2ba3b0 100644 --- a/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala +++ b/compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala @@ -248,6 +248,20 @@ trait MessageRendering { else sb.append(msg.message) if (dia.isVerbose) appendFilterHelp(dia, sb) + + if Diagnostic.shouldExplain(dia) then + sb.append(EOL).append(newBox()) + sb.append(EOL).append(offsetBox).append(" Explanation") + sb.append(EOL).append(newBox(soft = true)) + dia.msg.explanation.split(EOL).foreach { line => + sb.append(EOL).append(offsetBox).append(if line.isEmpty then "" else " ").append(line) + } + sb.append(EOL).append(endBox) + else if dia.msg.canExplain then + sb.append(EOL).append(newBox()) + sb.append(EOL).append(offsetBox).append(" longer explanation available when compiling with `-explain`") + sb.append(EOL).append(endBox) + sb.toString } diff --git a/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala b/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala index f64b970b5c80..733977734329 100644 --- a/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala +++ b/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala @@ -142,7 +142,7 @@ object ErrorReporting { |conforms to | $expected |but the comparison trace ended with `false`: - """ + |""" val c = ctx.typerState.constraint val constraintText = if c.domainLambdas.isEmpty then @@ -150,10 +150,9 @@ object ErrorReporting { else i"""a constraint with: |$c""" - i""" - |${TypeComparer.explained(_.isSubType(found, expected), header)} - | - |The tests were made under $constraintText""" + i"""${TypeComparer.explained(_.isSubType(found, expected), header)} + | + |The tests were made under $constraintText""" /** Format `raw` implicitNotFound or implicitAmbiguous argument, replacing * all occurrences of `${X}` where `X` is in `paramNames` with the diff --git a/compiler/test-resources/repl/errmsgs b/compiler/test-resources/repl/errmsgs index 14e9d44fa0b8..63b174c3b44e 100644 --- a/compiler/test-resources/repl/errmsgs +++ b/compiler/test-resources/repl/errmsgs @@ -6,7 +6,9 @@ scala> val x: List[String] = List(1) | ^ | Found: (1 : Int) | Required: String -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> val y: List[List[String]] = List(List(1)) -- [E007] Type Mismatch Error: ------------------------------------------------- @@ -14,7 +16,9 @@ scala> val y: List[List[String]] = List(List(1)) | ^ | Found: (1 : Int) | Required: String -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> val z: (List[String], List[Int]) = (List(1), List("a")) -- [E007] Type Mismatch Error: ------------------------------------------------- @@ -22,13 +26,17 @@ scala> val z: (List[String], List[Int]) = (List(1), List("a")) | ^ | Found: (1 : Int) | Required: String -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- -- [E007] Type Mismatch Error: ------------------------------------------------- 1 | val z: (List[String], List[Int]) = (List(1), List("a")) | ^^^ | Found: ("a" : String) | Required: Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 2 errors found scala> val a: Inv[String] = new Inv(new Inv(1)) -- [E007] Type Mismatch Error: ------------------------------------------------- @@ -36,7 +44,9 @@ scala> val a: Inv[String] = new Inv(new Inv(1)) | ^^^^^^^^^^ | Found: Inv[Int] | Required: String -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> val b: Inv[String] = new Inv(1) -- [E007] Type Mismatch Error: ------------------------------------------------- @@ -44,7 +54,9 @@ scala> val b: Inv[String] = new Inv(1) | ^ | Found: (1 : Int) | Required: String -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> abstract class C { type T; val x: T; val s: Unit = { type T = String; var y: T = x; locally { def f() = { type T = Int; val z: T = y }; f() } }; } -- [E007] Type Mismatch Error: ------------------------------------------------- @@ -55,7 +67,9 @@ scala> abstract class C { type T; val x: T; val s: Unit = { type T = String; var | |where: T is a type in class C | T² is a type in the initializer of value s which is an alias of String -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- -- [E007] Type Mismatch Error: ------------------------------------------------- 1 | abstract class C { type T; val x: T; val s: Unit = { type T = String; var y: T = x; locally { def f() = { type T = Int; val z: T = y }; f() } }; } | ^ @@ -64,7 +78,9 @@ longer explanation available when compiling with `-explain` | |where: T is a type in the initializer of value s which is an alias of String | T² is a type in method f which is an alias of Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 2 errors found scala> class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr -- [E008] Not Found Error: ----------------------------------------------------- @@ -78,33 +94,43 @@ scala> val x: List[Int] = "foo" :: List(1) | ^^^^^ | Found: ("foo" : String) | Required: Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> while ((( foo ))) {} -- [E006] Not Found Error: ----------------------------------------------------- 1 | while ((( foo ))) {} | ^^^ | Not found: foo -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> val a: iDontExist = 1 -- [E006] Not Found Error: ----------------------------------------------------- 1 | val a: iDontExist = 1 | ^^^^^^^^^^ | Not found: type iDontExist -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> def foo1(x: => Int) = x _ -- [E099] Syntax Error: -------------------------------------------------------- 1 | def foo1(x: => Int) = x _ | ^^^ |Only function types can be followed by _ but the current expression has type Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> def foo2(x: => Int): () => Int = x _ -- [E099] Syntax Error: -------------------------------------------------------- 1 | def foo2(x: => Int): () => Int = x _ | ^^^ |Only function types can be followed by _ but the current expression has type Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found diff --git a/compiler/test-resources/repl/i13208.default.scala b/compiler/test-resources/repl/i13208.default.scala index 586b5862a67f..c698dbab0b31 100644 --- a/compiler/test-resources/repl/i13208.default.scala +++ b/compiler/test-resources/repl/i13208.default.scala @@ -5,5 +5,7 @@ scala> try 1 | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- val res0: Int = 1 diff --git a/compiler/test-resources/repl/i2063 b/compiler/test-resources/repl/i2063 index e1da25588cdf..5c75d135b05a 100644 --- a/compiler/test-resources/repl/i2063 +++ b/compiler/test-resources/repl/i2063 @@ -3,19 +3,25 @@ scala> class Foo extends Bar // with one tab 1 | class Foo extends Bar // with one tab | ^^^ | Not found: type Bar -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> class Foo extends Bar // with spaces -- [E006] Not Found Error: ----------------------------------------------------- 1 | class Foo extends Bar // with spaces | ^^^ | Not found: type Bar -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> class Foo extends Bar // with tabs -- [E006] Not Found Error: ----------------------------------------------------- 1 | class Foo extends Bar // with tabs | ^^^ | Not found: type Bar -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found diff --git a/compiler/test-resources/repl/i2213 b/compiler/test-resources/repl/i2213 index b4f703b42167..8a40ce4adb4e 100644 --- a/compiler/test-resources/repl/i2213 +++ b/compiler/test-resources/repl/i2213 @@ -3,7 +3,9 @@ scala> def x 1 | def x | ^ | Missing return type -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- scala> def x: Int -- [E067] Syntax Error: -------------------------------------------------------- 1 | def x: Int diff --git a/compiler/test-resources/repl/i4217 b/compiler/test-resources/repl/i4217 index 61dfcdc3a955..9e7e25ec9196 100644 --- a/compiler/test-resources/repl/i4217 +++ b/compiler/test-resources/repl/i4217 @@ -6,5 +6,7 @@ scala> def foo(x: Option[Int]) = x match { case None => } | match may not be exhaustive. | | It would fail on pattern case: Some(_) -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- def foo(x: Option[Int]): Unit diff --git a/compiler/test-resources/repl/i4566 b/compiler/test-resources/repl/i4566 index 27516a98b0c1..b675775069ce 100644 --- a/compiler/test-resources/repl/i4566 +++ b/compiler/test-resources/repl/i4566 @@ -4,5 +4,7 @@ scala> object test { type ::[A, B]; def a: Int :: Int = ???; def b: Int = a } | ^ | Found: Int :: Int | Required: Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found diff --git a/compiler/test-resources/repl/i7644 b/compiler/test-resources/repl/i7644 index 4b6fd33acefa..5fafe74b0940 100644 --- a/compiler/test-resources/repl/i7644 +++ b/compiler/test-resources/repl/i7644 @@ -3,7 +3,9 @@ scala> class T extends CanEqual 1 | class T extends CanEqual | ^ | Cannot extend sealed trait CanEqual in a different source file -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- -- [E056] Syntax Error: -------------------------------------------------------- 1 | class T extends CanEqual | ^^^^^^^^ @@ -14,7 +16,9 @@ scala> class T extends CanEqual 1 | class T extends CanEqual | ^ | Cannot extend sealed trait CanEqual in a different source file -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- -- [E056] Syntax Error: -------------------------------------------------------- 1 | class T extends CanEqual | ^^^^^^^^ diff --git a/compiler/test-resources/repl/importFromObj b/compiler/test-resources/repl/importFromObj index 58e8c5370f72..e68f692525f7 100644 --- a/compiler/test-resources/repl/importFromObj +++ b/compiler/test-resources/repl/importFromObj @@ -10,7 +10,9 @@ scala> buf += xs | ^^ | Found: (o.xs : List[Int]) | Required: Int -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> buf ++= xs val res0: scala.collection.mutable.ListBuffer[Int] = ListBuffer(1, 2, 3) diff --git a/compiler/test-resources/repl/notFound b/compiler/test-resources/repl/notFound index e6b251d8b723..b93b5671be7a 100644 --- a/compiler/test-resources/repl/notFound +++ b/compiler/test-resources/repl/notFound @@ -3,12 +3,16 @@ scala> Foo 1 | Foo | ^^^ | Not found: Foo -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> Bar -- [E006] Not Found Error: ----------------------------------------------------- 1 | Bar | ^^^ | Not found: Bar -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found diff --git a/compiler/test-resources/repl/nowarn.scala b/compiler/test-resources/repl/nowarn.scala index 3236d60f9805..5a4d1ae4b808 100644 --- a/compiler/test-resources/repl/nowarn.scala +++ b/compiler/test-resources/repl/nowarn.scala @@ -5,7 +5,9 @@ scala> @annotation.nowarn def f = try 1 // @nowarn doesn't work on first line, c | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- def f: Int scala> @annotation.nowarn def f = try 1 def f: Int @@ -16,7 +18,9 @@ scala> def f = try 1 | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- def f: Int scala> @annotation.nowarn def f = { 1; 2 } def f: Int @@ -26,5 +30,7 @@ scala> def f = { 1; 2 } 1 | def f = { 1; 2 } | ^ |A pure expression does nothing in statement position; you may be omitting necessary parentheses -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- def f: Int diff --git a/compiler/test-resources/repl/overrides b/compiler/test-resources/repl/overrides index a32d4b18d404..6c9917e3645e 100644 --- a/compiler/test-resources/repl/overrides +++ b/compiler/test-resources/repl/overrides @@ -3,7 +3,9 @@ scala> class B { override def foo(i: Int): Unit = {}; } 1 | class B { override def foo(i: Int): Unit = {}; } | ^ | method foo overrides nothing -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala> class A { def foo: Unit = {}; } // defined class A @@ -12,5 +14,7 @@ scala> class B extends A { override def foo(i: Int): Unit = {}; } 1 | class B extends A { override def foo(i: Int): Unit = {}; } | ^ | method foo has a different signature than the overridden declaration -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found diff --git a/compiler/test-resources/repl/reset-command b/compiler/test-resources/repl/reset-command index e47b3c45f696..7ac4b4213399 100644 --- a/compiler/test-resources/repl/reset-command +++ b/compiler/test-resources/repl/reset-command @@ -22,7 +22,9 @@ scala> resetNoArgsStillWorks 1 | resetNoArgsStillWorks | ^^^^^^^^^^^^^^^^^^^^^ | Not found: resetNoArgsStillWorks -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found scala>:settings "-Dfoo=bar baz" diff --git a/compiler/test-resources/type-printer/type-mismatch b/compiler/test-resources/type-printer/type-mismatch index 363065320b9d..b98b0e40718d 100644 --- a/compiler/test-resources/type-printer/type-mismatch +++ b/compiler/test-resources/type-printer/type-mismatch @@ -8,5 +8,7 @@ scala> val x: Foo[String] = res0 | ^^^^ | Found: (res0 : Foo[Int]) | Required: Foo[String] -longer explanation available when compiling with `-explain` + |----------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·----------------------------------------------------------------------------- 1 error found diff --git a/tests/neg-custom-args/explicit-nulls/byname-nullables.check b/tests/neg-custom-args/explicit-nulls/byname-nullables.check index efe94a496c19..8da3f2caf38a 100644 --- a/tests/neg-custom-args/explicit-nulls/byname-nullables.check +++ b/tests/neg-custom-args/explicit-nulls/byname-nullables.check @@ -3,8 +3,9 @@ | ^ | Found: (x : String | Null) | Required: String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- Error: tests/neg-custom-args/explicit-nulls/byname-nullables.scala:43:32 -------------------------------------------- 43 | if x != null then f(identity(x), 1) // error: dropping not null check fails typing | ^^^^^^^^^^^ diff --git a/tests/neg-custom-args/explicit-nulls/i7883.check b/tests/neg-custom-args/explicit-nulls/i7883.check index 9a1165a6440e..e61e926c25d3 100644 --- a/tests/neg-custom-args/explicit-nulls/i7883.check +++ b/tests/neg-custom-args/explicit-nulls/i7883.check @@ -10,11 +10,13 @@ 6 | case r(hd, tl) => Some((hd, tl)) // error // error // error | ^^ | Not found: hd - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E006] Not Found Error: tests/neg-custom-args/explicit-nulls/i7883.scala:6:34 --------------------------------------- 6 | case r(hd, tl) => Some((hd, tl)) // error // error // error | ^^ | Not found: tl - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-custom-args/i11637.check b/tests/neg-custom-args/i11637.check index eca2cf91b99f..4261b465cb17 100644 --- a/tests/neg-custom-args/i11637.check +++ b/tests/neg-custom-args/i11637.check @@ -2,56 +2,55 @@ 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 -=========== - -I tried to show that - test2.FunctorImpl -conforms to - [Generic2[T <: String] <: Set[T]] =>> Any -but the comparison trace ended with `false`: - - ==> test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any - ==> type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] - ==> [T <: String] =>> Set[T] <: Iterable - ==> type bounds [] <: type bounds [ <: String] - ==> Any <: String - ==> Any <: String - <== Any <: String = false - <== Any <: String = false - <== type bounds [] <: type bounds [ <: String] = false - <== [T <: String] =>> Set[T] <: Iterable = false - <== type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false - <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false - -The tests were made under the empty constraint - + |-------------------------------------------------------------------------------------------------------------------- + | Explanation + |···················································································································· + | I tried to show that + | test2.FunctorImpl + | conforms to + | [Generic2[T <: String] <: Set[T]] =>> Any + | but the comparison trace ended with `false`: + | + | ==> test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any + | ==> type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] + | ==> [T <: String] =>> Set[T] <: Iterable + | ==> type bounds [] <: type bounds [ <: String] + | ==> Any <: String + | ==> Any <: String + | <== Any <: String = false + | <== Any <: String = false + | <== type bounds [] <: type bounds [ <: String] = false + | <== [T <: String] =>> Set[T] <: Iterable = false + | <== type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false + | <== 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 -=========== - -I tried to show that - test2.FunctorImpl -conforms to - [Generic2[T <: String] <: Set[T]] =>> Any -but the comparison trace ended with `false`: - - ==> test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any - ==> type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] - ==> [T <: String] =>> Set[T] <: Iterable - ==> type bounds [] <: type bounds [ <: String] - ==> Any <: String - ==> Any <: String - <== Any <: String = false - <== Any <: String = false - <== type bounds [] <: type bounds [ <: String] = false - <== [T <: String] =>> Set[T] <: Iterable = false - <== type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false - <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false - -The tests were made under the empty constraint + |-------------------------------------------------------------------------------------------------------------------- + | Explanation + |···················································································································· + | I tried to show that + | test2.FunctorImpl + | conforms to + | [Generic2[T <: String] <: Set[T]] =>> Any + | but the comparison trace ended with `false`: + | + | ==> test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any + | ==> type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] + | ==> [T <: String] =>> Set[T] <: Iterable + | ==> type bounds [] <: type bounds [ <: String] + | ==> Any <: String + | ==> Any <: String + | <== Any <: String = false + | <== Any <: String = false + | <== type bounds [] <: type bounds [ <: String] = false + | <== [T <: String] =>> Set[T] <: Iterable = false + | <== type bounds [[T <: String] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false + | <== test2.FunctorImpl <: [Generic2[T <: String] <: Set[T]] =>> Any = false + | + | The tests were made under the empty constraint + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-custom-args/i13026.check b/tests/neg-custom-args/i13026.check index ec729f1968b1..e9f09721c662 100644 --- a/tests/neg-custom-args/i13026.check +++ b/tests/neg-custom-args/i13026.check @@ -3,15 +3,17 @@ | ^^^^^^^^^^^^ | Found: ("not an int" : String) | Required: Int - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg-custom-args/i13026.scala:2:13 ------------------------------------------------- 2 |val y: Int = "not an int" // error | ^^^^^^^^^^^^ | Found: ("not an int" : String) | Required: Int - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E008] Not Found Error: tests/neg-custom-args/i13026.scala:3:20 ----------------------------------------------------- 3 |def foo(x: Any) = x.foo // error | ^^^^^ diff --git a/tests/neg-custom-args/i13838.check b/tests/neg-custom-args/i13838.check index 5730cb144e52..69b2f2ccf8da 100644 --- a/tests/neg-custom-args/i13838.check +++ b/tests/neg-custom-args/i13838.check @@ -22,5 +22,6 @@ | You can change the behavior by setting the `-Ximplicit-search-limit` value. | Smaller values cause the search to fail faster. | Larger values might make a very large search problem succeed. - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-custom-args/jdk-9-app.check b/tests/neg-custom-args/jdk-9-app.check index e2b94e2cb115..a584c6836a78 100644 --- a/tests/neg-custom-args/jdk-9-app.check +++ b/tests/neg-custom-args/jdk-9-app.check @@ -2,5 +2,6 @@ 4 | println(ProcessHandle.current().pid()) // error: not found | ^^^^^^^^^^^^^ | Not found: ProcessHandle - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-custom-args/kind-projector-underscores.check b/tests/neg-custom-args/kind-projector-underscores.check index bf4cdcfce30d..9cdef696620d 100644 --- a/tests/neg-custom-args/kind-projector-underscores.check +++ b/tests/neg-custom-args/kind-projector-underscores.check @@ -6,14 +6,16 @@ 10 | type -_ = Int // error -_ not allowed as a type def name without backticks | ^ | =, >:, or <: expected, but '_' found - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E095] Syntax Error: tests/neg-custom-args/kind-projector-underscores.scala:11:8 ------------------------------------ 11 | type +_ = Int // error +_ not allowed as a type def name without backticks | ^ | =, >:, or <: expected, but '_' found - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- Error: tests/neg-custom-args/kind-projector-underscores.scala:14:51 ------------------------------------------------- 14 |class BacktickUnderscoreIsNotFine extends Foo[List[`_`]] // error wildcard invalid as backquoted identifier | ^ diff --git a/tests/neg-custom-args/nowarn/nowarn-parser-error.check b/tests/neg-custom-args/nowarn/nowarn-parser-error.check index 049d3b5b1a18..c766a9ff44d0 100644 --- a/tests/neg-custom-args/nowarn/nowarn-parser-error.check +++ b/tests/neg-custom-args/nowarn/nowarn-parser-error.check @@ -2,12 +2,14 @@ 3 | def def // error | ^^^ | an identifier expected, but 'def' found - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E000] Syntax Warning: tests/neg-custom-args/nowarn/nowarn-parser-error.scala:2:10 ---------------------------------- 2 | def a = try 1 // warn | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-custom-args/nowarn/nowarn-typer-error.check b/tests/neg-custom-args/nowarn/nowarn-typer-error.check index da143965006b..8e2d8601d4af 100644 --- a/tests/neg-custom-args/nowarn/nowarn-typer-error.check +++ b/tests/neg-custom-args/nowarn/nowarn-typer-error.check @@ -2,5 +2,6 @@ 4 | def t1 = / // error | ^ | Not found: / - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-custom-args/nowarn/nowarn.check b/tests/neg-custom-args/nowarn/nowarn.check index 736d9f82e910..7cc018a14690 100644 --- a/tests/neg-custom-args/nowarn/nowarn.check +++ b/tests/neg-custom-args/nowarn/nowarn.check @@ -3,22 +3,25 @@ | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E000] Syntax Warning: tests/neg-custom-args/nowarn/nowarn.scala:23:25 ---------------------------------------------- 23 |@nowarn(o.inl) def t2d = try 1 // two warnings (`inl` is not a compile-time constant) | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E000] Syntax Warning: tests/neg-custom-args/nowarn/nowarn.scala:31:26 ---------------------------------------------- 31 |@nowarn("id=1") def t4d = try 1 // error and warning (unused nowarn, wrong id) | ^^^^^ | A try without catch or finally is equivalent to putting | its body in a block; no exceptions are handled. - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E000] Syntax Warning: tests/neg-custom-args/nowarn/nowarn.scala:33:28 ---------------------------------------------- 33 |@nowarn("verbose") def t5 = try 1 // warning with details | ^^^^^ @@ -27,14 +30,16 @@ longer explanation available when compiling with `-explain` Matching filters for @nowarn or -Wconf: - id=E0 - name=EmptyCatchOrFinallyBlock - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E129] Potential Issue Warning: tests/neg-custom-args/nowarn/nowarn.scala:13:11 ------------------------------------- 13 |def t2 = { 1; 2 } // warning (the invalid nowarn doesn't silence anything) | ^ | A pure expression does nothing in statement position; you may be omitting necessary parentheses - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- Warning: tests/neg-custom-args/nowarn/nowarn.scala:12:8 ------------------------------------------------------------- 12 |@nowarn("wat?") // warning (typer, invalid filter) | ^^^^^^ @@ -44,8 +49,9 @@ longer explanation available when compiling with `-explain` 16 |def t2a = { 1; 2 } // warning (invalid nowarn doesn't silence) | ^ | A pure expression does nothing in statement position; you may be omitting necessary parentheses - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- Warning: tests/neg-custom-args/nowarn/nowarn.scala:15:8 ------------------------------------------------------------- 15 |@nowarn(t1a.toString) // warning (typer, argument not a compile-time constant) | ^^^^^^^^^^^^ diff --git a/tests/neg-macros/beta-reduce-inline-result.check b/tests/neg-macros/beta-reduce-inline-result.check index 0dd6098fb820..c0fd1cbf8f6d 100644 --- a/tests/neg-macros/beta-reduce-inline-result.check +++ b/tests/neg-macros/beta-reduce-inline-result.check @@ -4,5 +4,6 @@ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Found: Int | Required: (4 : Int) - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-macros/i6436.check b/tests/neg-macros/i6436.check index d861ad90717d..b7e597997c1d 100644 --- a/tests/neg-macros/i6436.check +++ b/tests/neg-macros/i6436.check @@ -6,5 +6,6 @@ 6 | val ps: Seq[Expr[String]] = parts // error | ^^^^^ | Not found: parts - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-macros/type-splice-in-val-pattern.check b/tests/neg-macros/type-splice-in-val-pattern.check index 26a457127acb..eea13041e8af 100644 --- a/tests/neg-macros/type-splice-in-val-pattern.check +++ b/tests/neg-macros/type-splice-in-val-pattern.check @@ -2,5 +2,6 @@ 5 | val '[ *:[$t] ] = ??? // error | ^^ | Type splices cannot be used in val patterns. Consider using `match` instead. - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-scalajs/jsconstructorof-error-in-typer.check b/tests/neg-scalajs/jsconstructorof-error-in-typer.check index 391ffa4c6933..704fd97f8a34 100644 --- a/tests/neg-scalajs/jsconstructorof-error-in-typer.check +++ b/tests/neg-scalajs/jsconstructorof-error-in-typer.check @@ -2,17 +2,20 @@ 9 | val a = js.constructorOf[ScalaClass] // error | ^ | Type argument ScalaClass does not conform to upper bound scala.scalajs.js.Any - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E057] Type Mismatch Error: tests/neg-scalajs/jsconstructorof-error-in-typer.scala:10:27 ---------------------------- 10 | val b = js.constructorOf[ScalaTrait] // error | ^ | Type argument ScalaTrait does not conform to upper bound scala.scalajs.js.Any - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E057] Type Mismatch Error: tests/neg-scalajs/jsconstructorof-error-in-typer.scala:11:27 ---------------------------- 11 | val c = js.constructorOf[ScalaObject.type] // error | ^ | Type argument ScalaObject.type does not conform to upper bound scala.scalajs.js.Any - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg-scalajs/type-mismatch.check b/tests/neg-scalajs/type-mismatch.check index 2ea5f1f23945..2c3b55acd22c 100644 --- a/tests/neg-scalajs/type-mismatch.check +++ b/tests/neg-scalajs/type-mismatch.check @@ -3,5 +3,6 @@ | ^^^ | Found: (msg : String) | Required: Int - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/3559d.check b/tests/neg/3559d.check index 128093d8579a..46ad7bd5de8c 100644 --- a/tests/neg/3559d.check +++ b/tests/neg/3559d.check @@ -2,5 +2,6 @@ 7 | this(f) // error | ^ | Not found: f - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/6697.check b/tests/neg/6697.check index b2aeaa94d859..740d0bc0bb1e 100644 --- a/tests/neg/6697.check +++ b/tests/neg/6697.check @@ -9,5 +9,6 @@ | failed since selector O | does not match case Test.Of[sup, sub] => sub | and cannot be shown to be disjoint from it either. - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/EmptyCaseClassParams.check b/tests/neg/EmptyCaseClassParams.check index 6cd019571c73..5f66f55164d5 100644 --- a/tests/neg/EmptyCaseClassParams.check +++ b/tests/neg/EmptyCaseClassParams.check @@ -2,17 +2,20 @@ 2 | case class A[T] // error | ^ | A case class must have at least one parameter list - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E004] Syntax Error: tests/neg/EmptyCaseClassParams.scala:5:13 ------------------------------------------------------ 5 | case class B[T] // error | ^ | A case class must have at least one parameter list - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E004] Syntax Error: tests/neg/EmptyCaseClassParams.scala:9:9 ------------------------------------------------------- 9 | case D[T] extends Foo[T] // error | ^ | A case class must have at least one parameter list - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/EmptyEnum.check b/tests/neg/EmptyEnum.check index 91281e6904e7..0e91c33ebc15 100644 --- a/tests/neg/EmptyEnum.check +++ b/tests/neg/EmptyEnum.check @@ -2,5 +2,6 @@ 1 |enum EmptyEnum {} // error | ^^^^^^^^^ | Enumerations must contain at least one case - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/SummonFrom.check b/tests/neg/SummonFrom.check index e8bb4ad521f5..361324b4e13c 100644 --- a/tests/neg/SummonFrom.check +++ b/tests/neg/SummonFrom.check @@ -2,11 +2,13 @@ 4 | case x => ??? // error | ^ | Unexpected pattern for summonFrom. Expected `x: T` or `_` - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E153] Syntax Error: tests/neg/SummonFrom.scala:8:7 ----------------------------------------------------------------- 8 | case x@String => ??? // error | ^^^^^^^^ | Unexpected pattern for summonFrom. Expected `x: T` or `_` - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/abstract-givens.check b/tests/neg/abstract-givens.check index ee58afd3e76d..a8677b8c4c0d 100644 --- a/tests/neg/abstract-givens.check +++ b/tests/neg/abstract-givens.check @@ -12,5 +12,6 @@ | ^ | error overriding given instance z in trait T of type [T](using x$1: T): List[T]; | given instance z of type [T](using x$1: T): Seq[T] has incompatible type - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/ambiref.check b/tests/neg/ambiref.check index d222940e0dbc..787efefa5de5 100644 --- a/tests/neg/ambiref.check +++ b/tests/neg/ambiref.check @@ -4,29 +4,33 @@ | Reference to x is ambiguous, | it is both defined in object Test | and inherited subsequently in class D - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E049] Reference Error: tests/neg/ambiref.scala:10:14 --------------------------------------------------------------- 10 | println(x) // error | ^ | Reference to x is ambiguous, | it is both defined in object Test | and inherited subsequently in anonymous class test1.C {...} - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E049] Reference Error: tests/neg/ambiref.scala:17:14 --------------------------------------------------------------- 17 | println(y) // error | ^ | Reference to y is ambiguous, | it is both defined in method c | and inherited subsequently in anonymous class D {...} - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E049] Reference Error: tests/neg/ambiref.scala:25:16 --------------------------------------------------------------- 25 | println(y) // error | ^ | Reference to y is ambiguous, | it is both defined in method c | and inherited subsequently in class E - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/annot-printing.check b/tests/neg/annot-printing.check index 8c413e37a07e..305da4590697 100644 --- a/tests/neg/annot-printing.check +++ b/tests/neg/annot-printing.check @@ -3,5 +3,6 @@ | ^^^^^ | Found: ("abc" : String) | Required: Int @nowarn() @main @Foo @Bar("hello") - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/bad-unapplies.check b/tests/neg/bad-unapplies.check index a2ee445b7db5..3b322a67b8e0 100644 --- a/tests/neg/bad-unapplies.check +++ b/tests/neg/bad-unapplies.check @@ -5,35 +5,41 @@ | (x: B): Option[String] | (x: A): Option[String] | both match arguments (C) - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E127] Syntax Error: tests/neg/bad-unapplies.scala:23:9 ------------------------------------------------------------- 23 | case B("2") => // error (cannot be used as an extractor) | ^ | B cannot be used as an extractor in a pattern because it lacks an unapply or unapplySeq method - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E127] Syntax Error: tests/neg/bad-unapplies.scala:24:9 ------------------------------------------------------------- 24 | case D("2") => // error (cannot be used as an extractor) | ^ | D cannot be used as an extractor in a pattern because it lacks an unapply or unapplySeq method - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E050] Type Error: tests/neg/bad-unapplies.scala:25:9 --------------------------------------------------------------- 25 | case E("2") => // error (value unapply in object E does not take parameters) | ^ | value unapply in object E does not take parameters - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E107] Syntax Error: tests/neg/bad-unapplies.scala:26:10 ------------------------------------------------------------ 26 | case F("2") => // error (Wrong number of argument patterns for F; expected: ()) | ^^^^^^ | Wrong number of argument patterns for F; expected: () - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E006] Not Found Error: tests/neg/bad-unapplies.scala:27:9 ---------------------------------------------------------- 27 | case G("2") => // error (Not found: G) | ^ | Not found: G - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/enumWithType.check b/tests/neg/enumWithType.check index fcc06d3532a4..27bb52aaf6fc 100644 --- a/tests/neg/enumWithType.check +++ b/tests/neg/enumWithType.check @@ -2,5 +2,6 @@ 2 | case C[U](u: U) // error | ^ | explicit extends clause needed because both enum case and enum class have type parameters - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i10268.check b/tests/neg/i10268.check index e08571f7463d..63fc34b2edce 100644 --- a/tests/neg/i10268.check +++ b/tests/neg/i10268.check @@ -2,5 +2,6 @@ 2 | def test[T] = ?//test // error | ^ | Not found: ? - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i10757.check b/tests/neg/i10757.check index d60d2eea0b41..1536b3a06a65 100644 --- a/tests/neg/i10757.check +++ b/tests/neg/i10757.check @@ -2,5 +2,6 @@ 4 | case Var(name, _) => name: String // error | ^^^^^^^^^^^^ | Wrong number of argument patterns for Var; expected: (String) - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i11437.check b/tests/neg/i11437.check index f327d6a6a8d2..b8dc1ec207fd 100644 --- a/tests/neg/i11437.check +++ b/tests/neg/i11437.check @@ -2,5 +2,6 @@ 1 |transparent inline def foo = error // error | ^^^^^ | Not found: error - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i11544.check b/tests/neg/i11544.check index b4dba8a072c4..5c78991ae80c 100644 --- a/tests/neg/i11544.check +++ b/tests/neg/i11544.check @@ -7,5 +7,6 @@ | both match arguments ((23 : Int)) | | Note: Overloaded definitions introduced by refinements cannot be resolved - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i11561.check b/tests/neg/i11561.check index b1792511b0d0..2f4b73199b23 100644 --- a/tests/neg/i11561.check +++ b/tests/neg/i11561.check @@ -9,5 +9,6 @@ 3 | val updateText2 = copy(text = (_: String)) // error | ^^^^^^^^^^^^^^^^^^ | Reassignment to val text - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i12049.check b/tests/neg/i12049.check index 0efc803477a8..1144e0212d00 100644 --- a/tests/neg/i12049.check +++ b/tests/neg/i12049.check @@ -13,8 +13,9 @@ | Therefore, reduction cannot advance to the remaining case | | case B => String - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- Error: tests/neg/i12049.scala:14:23 --------------------------------------------------------------------------------- 14 |val y3: String = ??? : Last[Int *: Int *: Boolean *: String *: EmptyTuple] // error | ^ diff --git a/tests/neg/i12150.check b/tests/neg/i12150.check index 44f09d772b43..02bc1d305b42 100644 --- a/tests/neg/i12150.check +++ b/tests/neg/i12150.check @@ -2,11 +2,13 @@ 1 |def f: Unit = // error | ^ | expression expected but end found - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E129] Potential Issue Warning: tests/neg/i12150.scala:1:11 --------------------------------------------------------- 1 |def f: Unit = // error | ^ | A pure expression does nothing in statement position; you may be omitting necessary parentheses - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i12284.check b/tests/neg/i12284.check index 00e445d3c41c..7e49376e6153 100644 --- a/tests/neg/i12284.check +++ b/tests/neg/i12284.check @@ -5,5 +5,6 @@ | Required: Vector[F[Any]] | | where: F is a type in method magic with bounds <: [_] =>> Any - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i13435.check b/tests/neg/i13435.check index d60bea7ab588..01c01679bd4e 100644 --- a/tests/neg/i13435.check +++ b/tests/neg/i13435.check @@ -4,8 +4,9 @@ | match may not be exhaustive. | | It would fail on pattern case: (_), ((_, _), (_, _)) - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- Error: tests/neg/i13435.scala:8:10 ---------------------------------------------------------------------------------- 8 | case (dim: Axis, size: Int) => dim // error | ^^^^^^^^^ diff --git a/tests/neg/i13769.check b/tests/neg/i13769.check index 7785fbf4d198..7797d4f4fdd0 100644 --- a/tests/neg/i13769.check +++ b/tests/neg/i13769.check @@ -6,5 +6,6 @@ 2 |val te = tup.map((x: _ <: Int) => List(x)) // error // error | ^ | Not found: x - -longer explanation available when compiling with `-explain` \ No newline at end of file + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i13960.check b/tests/neg/i13960.check index ce280f48be4c..dabc26b537b7 100644 --- a/tests/neg/i13960.check +++ b/tests/neg/i13960.check @@ -2,5 +2,6 @@ 13 | case A() => // error | ^^^ | A is not a valid result type of an unapply method of an extractor. - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i2033.check b/tests/neg/i2033.check index 0c5a9da975bd..b8a03fdc9f03 100644 --- a/tests/neg/i2033.check +++ b/tests/neg/i2033.check @@ -7,8 +7,9 @@ | ^^^^^^^ | Found: Unit | Required: String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- Warning: tests/neg/i2033.scala:6:37 --------------------------------------------------------------------------------- 6 | val out = new ObjectOutputStream(println) | ^^^^^^^ diff --git a/tests/neg/i4382.check b/tests/neg/i4382.check index 3d21702ffe0f..1617241dabbf 100644 --- a/tests/neg/i4382.check +++ b/tests/neg/i4382.check @@ -2,23 +2,27 @@ 3 | def v1: Id[_] = ??? // error | ^^^^^ | unreducible application of higher-kinded type App.Id to wildcard arguments - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E043] Type Error: tests/neg/i4382.scala:6:10 ----------------------------------------------------------------------- 6 | def v2: HkL[_] = ??? // error | ^^^^^^ | unreducible application of higher-kinded type App.HkL to wildcard arguments - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E043] Type Error: tests/neg/i4382.scala:9:10 ----------------------------------------------------------------------- 9 | def v3: HkU[_] = ??? // error | ^^^^^^ | unreducible application of higher-kinded type App.HkU to wildcard arguments - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E043] Type Error: tests/neg/i4382.scala:12:10 ---------------------------------------------------------------------- 12 | def v4: HkAbs[_] = ??? // error | ^^^^^^^^ | unreducible application of higher-kinded type App.HkAbs to wildcard arguments - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i5101.check b/tests/neg/i5101.check index 151b8cf2dd4e..78ba955f7628 100644 --- a/tests/neg/i5101.check +++ b/tests/neg/i5101.check @@ -2,5 +2,6 @@ 11 | case A0(_) => // error | ^^ | Not found: A0 - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i5311.check b/tests/neg/i5311.check index bd2940afc7a9..9b76cc5a7418 100644 --- a/tests/neg/i5311.check +++ b/tests/neg/i5311.check @@ -3,5 +3,6 @@ | ^^^^^^^^^^^^^^^^^^^ | Found: s.T[Int] => s.T[Int] | Required: m.Foo - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i6183.check b/tests/neg/i6183.check index acb2a58766ec..31e3e983c649 100644 --- a/tests/neg/i6183.check +++ b/tests/neg/i6183.check @@ -17,5 +17,6 @@ | [B](b: B)(using x$2: DummyImplicit): Char | [A](a: A): String | both match arguments ((42 : Int)) - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i6205.check b/tests/neg/i6205.check index caca487ee2db..43a6f297b216 100644 --- a/tests/neg/i6205.check +++ b/tests/neg/i6205.check @@ -2,5 +2,6 @@ 4 | def foo = // error | ^ | Type argument Nothing does not conform to lower bound Null in inferred type Contra[Nothing] - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i6762b.check b/tests/neg/i6762b.check index 9c0d571dd77b..e21906d34080 100644 --- a/tests/neg/i6762b.check +++ b/tests/neg/i6762b.check @@ -3,5 +3,6 @@ | ^^^^^^^^^^^ | Found: Expr[String] | Required: Expr[G[String]] - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i6779.check b/tests/neg/i6779.check index d2953c80f2b4..2b7d773cfd2b 100644 --- a/tests/neg/i6779.check +++ b/tests/neg/i6779.check @@ -3,8 +3,9 @@ | ^^^^^^^^^^^^^^^^^^^^^^^^ | Found: F[T] | Required: F[G[T]] - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E008] Not Found Error: tests/neg/i6779.scala:12:31 ----------------------------------------------------------------- 12 | def g2[T](x: T): F[G[T]] = x.f // error | ^^^ @@ -20,5 +21,6 @@ longer explanation available when compiling with `-explain` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Found: F[T] | Required: F[G[T]] - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i7195.check b/tests/neg/i7195.check index 0d393ca0e979..8976f343f694 100644 --- a/tests/neg/i7195.check +++ b/tests/neg/i7195.check @@ -6,5 +6,6 @@ | | where: T is a type in object B | T² is a type in object A - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i7359-g.check b/tests/neg/i7359-g.check index 43257ae2a596..c9542d31d3fd 100644 --- a/tests/neg/i7359-g.check +++ b/tests/neg/i7359-g.check @@ -3,5 +3,6 @@ | ^^^^^^^^^^^^^ | Found: () => String | Required: SAMTrait - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i8569.check b/tests/neg/i8569.check index c33cb68d750c..0a5eb7d1f3a6 100644 --- a/tests/neg/i8569.check +++ b/tests/neg/i8569.check @@ -2,5 +2,6 @@ 13 | val x = outer.Inner(2) // error (at posttyper) | ^^^^^^^^^^^^^^ | Outer is not a valid class prefix, since it is not an immutable path - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i8569a.check b/tests/neg/i8569a.check index b6ba88cba3b6..e02a2cc7b24a 100644 --- a/tests/neg/i8569a.check +++ b/tests/neg/i8569a.check @@ -2,5 +2,6 @@ 13 | val x = new outer2.Inner(2) // error (at typer) | ^^^^^^ | (Test.outer2 : => Outer2) is not a valid type prefix, since it is not an immutable path - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i8623.check b/tests/neg/i8623.check index 9b9a20ce7bf5..8448560b4740 100644 --- a/tests/neg/i8623.check +++ b/tests/neg/i8623.check @@ -7,5 +7,6 @@ | But the part corresponding to `` is not a reference that can be generated. | This might be because resolution yielded as given instance a function that is not | known to be total and side-effect free. - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i8736.check b/tests/neg/i8736.check index 80986464d035..cc7ae4dba48a 100644 --- a/tests/neg/i8736.check +++ b/tests/neg/i8736.check @@ -3,15 +3,17 @@ | ^^^^^^^^^^^^ | Found: Any | Required: String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/i8736.scala:30:29 ------------------------------------------------------------- 30 | def res2: Int = rec.get("v") // error: type mismatch | ^^^^^^^^^^^^ | Found: Any | Required: Int - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E051] Reference Error: tests/neg/i8736.scala:31:26 ----------------------------------------------------------------- 31 | def res3: Boolean = rec.get("z") // error: ambiguous | ^^^^^^^ @@ -22,5 +24,6 @@ longer explanation available when compiling with `-explain` | all match arguments (("z" : String)) | | Note: Overloaded definitions introduced by refinements cannot be resolved - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i8752.check b/tests/neg/i8752.check index cf2feb0cc7c6..a84fa674b66d 100644 --- a/tests/neg/i8752.check +++ b/tests/neg/i8752.check @@ -3,8 +3,9 @@ | ^^^^ | C does not take type parameters | (Note that F-bounds of type parameters may not be type lambdas) - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- Error: tests/neg/i8752.scala:3:39 ----------------------------------------------------------------------------------- 3 |trait Arround1[C <:[X]=>>IterableOps[X,C,C[X]] ] // error // error | ^ diff --git a/tests/neg/i8988.check b/tests/neg/i8988.check index 6952837128ed..2c6a534edca7 100644 --- a/tests/neg/i8988.check +++ b/tests/neg/i8988.check @@ -3,5 +3,6 @@ | ^^ | Found: (ys : List[Int]) | Required: String - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i9436.check b/tests/neg/i9436.check index 8938dbacb6cb..f5117ae72ccc 100644 --- a/tests/neg/i9436.check +++ b/tests/neg/i9436.check @@ -2,8 +2,9 @@ 8 | println(x.f1) // error | ^^^^ | method f1 must be called with () argument - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- Error: tests/neg/i9436.scala:9:14 ----------------------------------------------------------------------------------- 9 | println(x.f2(1)) // error | ^^^^^^^ diff --git a/tests/neg/i9437.check b/tests/neg/i9437.check index d0b2226e5a0c..2975f045773e 100644 --- a/tests/neg/i9437.check +++ b/tests/neg/i9437.check @@ -2,5 +2,6 @@ 7 | println(x.f1()) // error | ^^^^ | method selectDynamic in trait Selectable does not take parameters - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i9803.check b/tests/neg/i9803.check index 57e184487504..c190149bbe23 100644 --- a/tests/neg/i9803.check +++ b/tests/neg/i9803.check @@ -4,5 +4,6 @@ | Reference to f421 is ambiguous, | it is both imported by name by import bugs.shadowing.x.f421 | and imported by name subsequently by import bugs.shadowing.y.f421 - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/i9958.check b/tests/neg/i9958.check index 3657c466dc8b..0b684d43299e 100644 --- a/tests/neg/i9958.check +++ b/tests/neg/i9958.check @@ -7,5 +7,6 @@ | ^ | Found: G[[A <: Int] =>> List[A]] | Required: G[List] - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/if-error.check b/tests/neg/if-error.check index c2f1b02b2067..e82895be9291 100644 --- a/tests/neg/if-error.check +++ b/tests/neg/if-error.check @@ -4,5 +4,6 @@ | Found: Unit | Required: Int | Maybe you are missing an else part for the conditional? - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/kinds2.check b/tests/neg/kinds2.check index 2921c7baf022..182aadf3874a 100644 --- a/tests/neg/kinds2.check +++ b/tests/neg/kinds2.check @@ -2,5 +2,6 @@ 14 | f[C] // error: missing type parameter(s) | ^ | Missing type parameter for Test.C - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/leading-infix-miss.check b/tests/neg/leading-infix-miss.check index df9c4d8dd3e0..9d95eded7e53 100644 --- a/tests/neg/leading-infix-miss.check +++ b/tests/neg/leading-infix-miss.check @@ -11,5 +11,6 @@ | ^ | Found: Unit | Required: Boolean - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/matchtype-seq.check b/tests/neg/matchtype-seq.check index 07db895b9006..f0074c9b6e7f 100644 --- a/tests/neg/matchtype-seq.check +++ b/tests/neg/matchtype-seq.check @@ -29,8 +29,9 @@ | Therefore, reduction cannot advance to the remaining case | | case (2 : Int) => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:12:20 ----------------------------------------------------- 12 | identity[T1[Int]](1) // error | ^ @@ -46,8 +47,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case (2 : Int) => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:21:20 ----------------------------------------------------- 21 | identity[T2[Int]]("") // error | ^^ @@ -63,15 +65,17 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case _ => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:22:18 ----------------------------------------------------- 22 | identity[T2[2]](1) // error | ^ | Found: (1 : Int) | Required: String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:23:20 ----------------------------------------------------- 23 | identity[T2[Int]](1) // error | ^ @@ -87,8 +91,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case _ => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:36:18 ----------------------------------------------------- 36 | identity[T3[A]](1) // error | ^ @@ -104,8 +109,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.C => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:37:18 ----------------------------------------------------- 37 | identity[T3[A]]("") // error | ^^ @@ -121,8 +127,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.C => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:55:18 ----------------------------------------------------- 55 | identity[T5[A]](1) // error | ^ @@ -138,8 +145,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.A => Int - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:56:18 ----------------------------------------------------- 56 | identity[T5[A]]("") // error | ^^ @@ -155,8 +163,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.A => Int - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:82:18 ----------------------------------------------------- 82 | identity[T7[D]]("") // error | ^^ @@ -172,8 +181,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.D => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:83:18 ----------------------------------------------------- 83 | identity[T7[D]](1) // error | ^ @@ -189,8 +199,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.D => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:94:19 ----------------------------------------------------- 94 | identity[T8[E2]](1) // error | ^ @@ -206,15 +217,17 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.E2 => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:95:19 ----------------------------------------------------- 95 | identity[T8[E1]]("") // error | ^^ | Found: ("" : String) | Required: Int - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:96:19 ----------------------------------------------------- 96 | identity[T8[E2]]("") // error | ^^ @@ -230,8 +243,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.E2 => String - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:105:40 ---------------------------------------------------- 105 | identity[T9[Tuple2[Nothing, String]]](1) // error | ^ @@ -243,8 +257,9 @@ longer explanation available when compiling with `-explain` | trying to reduce Test.T9[(Nothing, String)] | failed since selector (Nothing, String) | is uninhabited (there are no values of that type). - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:106:40 ---------------------------------------------------- 106 | identity[T9[Tuple2[String, Nothing]]]("1") // error | ^^^ @@ -256,8 +271,9 @@ longer explanation available when compiling with `-explain` | trying to reduce Test.T9[(String, Nothing)] | failed since selector (String, Nothing) | is uninhabited (there are no values of that type). - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:107:37 ---------------------------------------------------- 107 | identity[T9[Tuple2[Int, Nothing]]](1) // error | ^ @@ -269,8 +285,9 @@ longer explanation available when compiling with `-explain` | trying to reduce Test.T9[(Int, Nothing)] | failed since selector (Int, Nothing) | is uninhabited (there are no values of that type). - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:108:37 ---------------------------------------------------- 108 | identity[T9[Tuple2[Nothing, Int]]]("1") // error | ^^^ @@ -282,8 +299,9 @@ longer explanation available when compiling with `-explain` | trying to reduce Test.T9[(Nothing, Int)] | failed since selector (Nothing, Int) | is uninhabited (there are no values of that type). - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:109:29 ---------------------------------------------------- 109 | identity[T9[Tuple2[_, _]]]("") // error | ^^ @@ -299,8 +317,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case (String, Int) => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:110:29 ---------------------------------------------------- 110 | identity[T9[Tuple2[_, _]]](1) // error | ^ @@ -316,8 +335,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case (String, Int) => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:111:33 ---------------------------------------------------- 111 | identity[T9[Tuple2[Any, Any]]]("") // error | ^^ @@ -333,8 +353,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case (String, Int) => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:112:33 ---------------------------------------------------- 112 | identity[T9[Tuple2[Any, Any]]](1) // error | ^ @@ -350,8 +371,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case (String, Int) => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:122:39 ---------------------------------------------------- 122 | identity[TA[Box2[Int, Int, String]]](1) // error | ^ @@ -367,8 +389,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.Box2[Int, Int, String] => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:123:39 ---------------------------------------------------- 123 | identity[TA[Box2[Int, Int, String]]]("") // error | ^^ @@ -384,8 +407,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.Box2[Int, Int, String] => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:144:41 ---------------------------------------------------- 144 | identity[TD[Box2_C[Int, Int, String]]]("") // error | ^^ @@ -401,8 +425,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Test.Box2_C[Int, Int, String] => String - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:153:25 ---------------------------------------------------- 153 | def a[A]: M[Some[A]] = 1 // error | ^ @@ -418,8 +443,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Some[_] => Int - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:154:25 ---------------------------------------------------- 154 | def b[A]: M[Some[A]] = "" // error | ^^ @@ -435,8 +461,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case Some[_] => Int - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:168:23 ---------------------------------------------------- 168 | val a: M[Inv[A]] = 1 // error | ^ @@ -452,8 +479,9 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case _ => Int - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/matchtype-seq.scala:187:25 ---------------------------------------------------- 187 | val a: M[Inv[A]] = 1 // error | ^ @@ -469,5 +497,6 @@ longer explanation available when compiling with `-explain` | Therefore, reduction cannot advance to the remaining case | | case _ => Int - -longer explanation available when compiling with `-explain` + |------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/missing-implicit-2.check b/tests/neg/missing-implicit-2.check index 4ec525f4a34e..a478f2ef87b4 100644 --- a/tests/neg/missing-implicit-2.check +++ b/tests/neg/missing-implicit-2.check @@ -26,5 +26,6 @@ | | where: Byte is a class in package scala | Byte² is a class in package java.lang - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/missing-implicit-3.check b/tests/neg/missing-implicit-3.check index a41f2bba8a3e..9dbba37f18f9 100644 --- a/tests/neg/missing-implicit-3.check +++ b/tests/neg/missing-implicit-3.check @@ -12,8 +12,9 @@ | | import concurrent.duration.pairIntToDuration | - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E008] Not Found Error: tests/neg/missing-implicit-3.scala:8:48 ----------------------------------------------------- 8 |val d2: scala.concurrent.duration.Duration = 10.days // error | ^^^^^^^ diff --git a/tests/neg/module-class-name.check b/tests/neg/module-class-name.check index 0888689553fb..64ccaa89c32b 100644 --- a/tests/neg/module-class-name.check +++ b/tests/neg/module-class-name.check @@ -3,29 +3,33 @@ | ^ | Found: Test.C.type | Required: Test.C - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/module-class-name.scala:9:15 -------------------------------------------------- 9 | val y: C = f(C) // error | ^ | Found: Test.C.type | Required: Test.C - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/module-class-name.scala:12:14 ------------------------------------------------- 12 | val z1: C = z // error | ^ | Found: Test.C.type | Required: Test.C - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/module-class-name.scala:13:16 ------------------------------------------------- 13 | val z2: Int = z // error | ^ | Found: Test.C.type | Required: Int - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E008] Not Found Error: tests/neg/module-class-name.scala:15:4 ------------------------------------------------------ 15 | C.foo // error: value foo is not a member of object Test.C | ^^^^^ diff --git a/tests/neg/multi-file-error.check b/tests/neg/multi-file-error.check index bf3547333361..716afcc1809b 100644 --- a/tests/neg/multi-file-error.check +++ b/tests/neg/multi-file-error.check @@ -2,11 +2,13 @@ 2 | foo() // error | ^^^ | Not found: foo - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E006] Not Found Error: tests/neg/multi-file-error/B.scala:2:2 ------------------------------------------------------ 2 | bar() // error | ^^^ | Not found: bar - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/print-infix-type.check b/tests/neg/print-infix-type.check index bb96c0cbb5de..5e0983d2de72 100644 --- a/tests/neg/print-infix-type.check +++ b/tests/neg/print-infix-type.check @@ -3,5 +3,6 @@ | ^ | Found: Int over String | Required: String over Int - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/singleton-ops-any.check b/tests/neg/singleton-ops-any.check index be234d405b4e..59add01e6d54 100644 --- a/tests/neg/singleton-ops-any.check +++ b/tests/neg/singleton-ops-any.check @@ -3,40 +3,46 @@ | ^^^^ | Found: (true : Boolean) | Required: (false : Boolean) - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:7:22 -------------------------------------------------- 7 | val t35: 10 == 10 = false // error | ^^^^^ | Found: (false : Boolean) | Required: (true : Boolean) - -longer explanation available when compiling with `-explain` + |--------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:12:24 ------------------------------------------------- 12 | val t38: false != 5 = false // error | ^^^^^ | Found: (false : Boolean) | Required: (true : Boolean) - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:13:22 ------------------------------------------------- 13 | val t39: 10 != 10 = true // error | ^^^^ | Found: (true : Boolean) | Required: (false : Boolean) - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:18:27 ------------------------------------------------- 18 | val t04: ToString[Int] = "Int" // error | ^^^^^ | Found: ("Int" : String) | Required: compiletime.ops.any.ToString[Int] - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E007] Type Mismatch Error: tests/neg/singleton-ops-any.scala:32:26 ------------------------------------------------- 32 | val t48: IsConst[Any] = true // error | ^^^^ | Found: (true : Boolean) | Required: (false : Boolean) - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/spaces-vs-tabs.check b/tests/neg/spaces-vs-tabs.check index 862465a18dbe..d87858d80587 100644 --- a/tests/neg/spaces-vs-tabs.check +++ b/tests/neg/spaces-vs-tabs.check @@ -32,5 +32,6 @@ 13 | 1 | ^ | A pure expression does nothing in statement position; you may be omitting necessary parentheses - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/splice-pat.check b/tests/neg/splice-pat.check index 68fda3e96e72..13bae18a39cf 100644 --- a/tests/neg/splice-pat.check +++ b/tests/neg/splice-pat.check @@ -2,8 +2,9 @@ 12 | case '{ foo(${ // error: pattern expected | ^ | pattern expected - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- -- [E040] Syntax Error: tests/neg/splice-pat.scala:15:5 ---------------------------------------------------------------- 15 | })} => ??? // error | ^ diff --git a/tests/neg/t6124.check b/tests/neg/t6124.check index 9c7498d60f88..17e875930ad4 100644 --- a/tests/neg/t6124.check +++ b/tests/neg/t6124.check @@ -62,5 +62,6 @@ 21 | val x1 = _52 // error | ^^^ | Not found: _52 - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·-------------------------------------------------------------------------------------------------------------------- diff --git a/tests/neg/t6663.check b/tests/neg/t6663.check index 806f3357a0f6..3d191837edf2 100644 --- a/tests/neg/t6663.check +++ b/tests/neg/t6663.check @@ -3,5 +3,6 @@ | ^^^^^^^^^^^^^^^^^^^^^^^^^ | Found: String | Required: Int - -longer explanation available when compiling with `-explain` + |-------------------------------------------------------------------------------------------------------------------- + | longer explanation available when compiling with `-explain` + ·--------------------------------------------------------------------------------------------------------------------