Skip to content

Commit 3262acc

Browse files
committed
Fix tests
1 parent 81d7d03 commit 3262acc

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

tests/neg/erased-5.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ object Test {
33
type UU[T] = erased T => Int
44

55
def main(args: Array[String]): Unit = {
6-
fun { x =>
7-
x // error: Cannot use `erased` value in a context that is not `erased`
6+
fun { x => // error: `Int => Int` not compatible with `erased Int => Int`
7+
x
88
}
99

1010
fun {

tests/neg/i2146.scala

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
object Test {
2-
case class A()
3-
case class B()
4-
5-
def foo[A, B]: given A => given B => Int = { given b: B =>
6-
42 // error: found Int, required: given A => given B => Int
1+
class Test {
2+
def foo[A, B]: given A => given B => Int = { given b: B => // error: found Int, required: given A => given B => Int
3+
42
74
}
85
}

tests/neg/i5311.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
-- [E007] Type Mismatch Error: tests/neg/i5311.scala:11:27 -------------------------------------------------------------
1+
-- [E007] Type Mismatch Error: tests/neg/i5311.scala:11:9 --------------------------------------------------------------
22
11 | baz((x : s.T[Int]) => x) // error
3-
| ^
4-
| Found: s.T[Int] => s.T[Int]
5-
| Required: m.Foo
3+
| ^^^^^^^^^^^^^^^^^^
4+
| Found: s.T[Int] => s.T[Int]
5+
| Required: m.Foo

tests/neg/i5592.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ object Test {
2020
}
2121

2222
val eqSymmetric2: Forall[[x] =>> (y: Obj) => (EQ[x, y.type]) => (EQ[y.type, x])] = {
23-
{ x: Obj => { y: Obj => { xEqy: EQ[x.type, y.type] => xEqy.commute } } } // error // error
23+
{ x: Obj => { y: Obj => { xEqy: EQ[x.type, y.type] => xEqy.commute } } } // error
2424
}
2525

2626
val eqSymmetric3: Forall[[x] =>> Forall[[y] =>> EQ[x, y] => EQ[y, x]]] = {
27-
{ x: Obj => { y: Obj => { xEqy: EQ[x.type, y.type] => xEqy.commute } } } // error // error
27+
{ x: Obj => { y: Obj => { xEqy: EQ[x.type, y.type] => xEqy.commute } } } // error
2828
}
2929
}

0 commit comments

Comments
 (0)