Skip to content

Commit 5a6055e

Browse files
committed
Update check files of tests
1 parent de6bf43 commit 5a6055e

27 files changed

+89
-11
lines changed

tests/neg-custom-args/explicit-nulls/byname-nullables.check

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
| ^
44
| Found: (x : String | Null)
55
| Required: String
6+
7+
longer explanation available when compiling with `-explain`
68
-- Error: tests/neg-custom-args/explicit-nulls/byname-nullables.scala:43:32 --------------------------------------------
79
43 | if x != null then f(identity(x), 1) // error: dropping not null check fails typing
810
| ^^^^^^^^^^^
@@ -19,7 +21,7 @@
1921
| Wrapping the argument in `byName(...)` fixes the problem by disabling the flow assumptions.
2022
|
2123
| `byName` needs to be imported from the `scala.compiletime` package.
22-
-- [E134] Type Mismatch Error: tests/neg-custom-args/explicit-nulls/byname-nullables.scala:81:22 -----------------------
24+
-- [E134] Type Error: tests/neg-custom-args/explicit-nulls/byname-nullables.scala:81:22 --------------------------------
2325
81 | if x != null then f(byName(x), 1) // error: none of the overloaded methods match argument types
2426
| ^
2527
| None of the overloaded alternatives of method f in object Test7 with types

tests/neg-custom-args/explicit-nulls/i7883.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- [E134] Type Mismatch Error: tests/neg-custom-args/explicit-nulls/i7883.scala:6:11 -----------------------------------
1+
-- [E134] Type Error: tests/neg-custom-args/explicit-nulls/i7883.scala:6:11 --------------------------------------------
22
6 | case r(hd, tl) => Some((hd, tl)) // error // error // error
33
| ^
44
| None of the overloaded alternatives of method unapplySeq in class Regex with types

tests/neg-custom-args/ovlazy.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Error: tests/neg-custom-args/ovlazy.scala:5:20 ----------------------------------------------------------------------
1+
-- [E164] Declaration Error: tests/neg-custom-args/ovlazy.scala:5:20 ---------------------------------------------------
22
5 | override lazy val x: Int = 2 // error
33
| ^
44
| error overriding value x in class A of type Int;

tests/neg-macros/beta-reduce-inline-result.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
| Found: Int
66
| Required: (4 : Int)
7+
8+
longer explanation available when compiling with `-explain`

tests/neg/abstract-givens.check

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
11 | given s[T](using T): Seq[T] with // error
33
| ^
44
|instance cannot be created, since def iterator: => Iterator[A] in trait IterableOnce in package scala.collection is not defined
5-
-- Error: tests/neg/abstract-givens.scala:8:8 --------------------------------------------------------------------------
5+
-- [E164] Declaration Error: tests/neg/abstract-givens.scala:8:8 -------------------------------------------------------
66
8 | given y(using Int): String = summon[Int].toString * 22 // error
77
| ^
88
| error overriding given instance y in trait T of type (using x$1: Int): String;
99
| given instance y of type (using x$1: Int): String cannot override final member given instance y in trait T
10-
-- Error: tests/neg/abstract-givens.scala:9:8 --------------------------------------------------------------------------
10+
-- [E163] Declaration Error: tests/neg/abstract-givens.scala:9:8 -------------------------------------------------------
1111
9 | given z[T](using T): Seq[T] = List(summon[T]) // error
1212
| ^
1313
| error overriding given instance z in trait T of type [T](using x$1: T): List[T];
1414
| given instance z of type [T](using x$1: T): Seq[T] has incompatible type
15+
16+
longer explanation available when compiling with `-explain`

tests/neg/exports2.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Error: tests/neg/exports2.scala:8:11 --------------------------------------------------------------------------------
1+
-- [E164] Declaration Error: tests/neg/exports2.scala:8:11 -------------------------------------------------------------
22
8 | export A._ // error
33
| ^
44
| error overriding method f in trait B of type => String;

tests/neg/i11637.check

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- [E057] Type Mismatch Error: tests/neg/i11637.scala:11:33 ------------------------------------------------------------
2+
11 | var h = new HKT3_1[FunctorImpl](); // error // error
3+
| ^
4+
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any
5+
6+
longer explanation available when compiling with `-explain`
7+
-- [E057] Type Mismatch Error: tests/neg/i11637.scala:11:21 ------------------------------------------------------------
8+
11 | var h = new HKT3_1[FunctorImpl](); // error // error
9+
| ^
10+
| Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any
11+
12+
longer explanation available when compiling with `-explain`

tests/neg/i11637.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This is OK
2+
object test1:
3+
class FunctorImpl[Generic1[T] <: Iterable[T]]{}
4+
class HKT3_1[Functor[Generic2[T]<:Set[T]]]{}
5+
var h = new HKT3_1[FunctorImpl]();
6+
7+
// This is has error
8+
object test2:
9+
class FunctorImpl[Generic1[T] <: Iterable[T]]{}
10+
class HKT3_1[Functor[Generic2[T<:String]<:Set[T]]]{}
11+
var h = new HKT3_1[FunctorImpl](); // error // error
12+

tests/neg/i2033.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
| ^^^^^^^
88
| Found: Unit
99
| Required: String
10+
11+
longer explanation available when compiling with `-explain`

tests/neg/i5311.check

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
| ^^^^^^^^^^^^^^^^^^
44
| Found: s.T[Int] => s.T[Int]
55
| Required: m.Foo
6+
7+
longer explanation available when compiling with `-explain`

0 commit comments

Comments
 (0)