Skip to content

Commit db39f61

Browse files
committed
Revert "Fix tests"
This reverts commit 1bbb255. # Conflicts: # library/src-bootstrapped/scala/internal/quoted/Expr.scala # tests/run-macros/i9812b/Macro_1.scala # tests/run-staging/quote-nested-1.scala
1 parent 783f5e7 commit db39f61

17 files changed

+24
-24
lines changed

tests/neg/i2006.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ object Test {
44
inline def bar(f: Int ?=> Int) = f // error
55

66
def main(args: Array[String]) = {
7-
foo((using thisTransaction) => 43)
8-
bar((using thisTransaction) => 44)
7+
foo(thisTransaction ?=> 43)
8+
bar(thisTransaction ?=> 44)
99
}
1010
}

tests/neg/i2146.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Test {
2-
def foo[A, B]: A ?=> B ?=> Int = { (using b: B) => // error: found Int, required: A ?=> B ?=> Int
2+
def foo[A, B]: A ?=> B ?=> Int = { (b: B) ?=> // error: found Int, required: A ?=> B ?=> Int
33
42
44
}
55
}

tests/neg/i4668.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ trait Functor[F[_]] { def map[A,B](x: F[A])(f: A => B): F[B] }
88
object Functor { implicit object listFun extends Functor[List] { def map[A,B](ls: List[A])(f: A => B) = ls.map(f) } }
99

1010
val map: (A:Type,B:Type,F:Type1) ?=> (Functor[F.T]) ?=> (F.T[A.T]) => (A.T => B.T) => F.T[B.T] =
11-
(using fun) => (using x) => f => fun.map(x)(f) // error
11+
fun ?=> x => f => fun.map(x)(f) // error

tests/neg/scoped-quoted-expr-proto.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ package b {
6969
}
7070
}
7171

72-
r { (using qctx) =>
72+
r { qctx ?=>
7373
var escaped: qctx.Expr[Double] = ???
7474
q{ (x: Double) =>
7575
s{
@@ -127,7 +127,7 @@ package c {
127127
}
128128
}
129129

130-
r { (using qctx) =>
130+
r { qctx ?=>
131131
var escaped: qctx.Expr[Double] = ???
132132
q{ (x: Double) =>
133133
s{

tests/pos/case-getters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
case class Foo(x: 1, y: Int ?=> Int)
22
object Test {
3-
val f = Foo(1, (using i: Int) => i)
3+
val f = Foo(1, (i: Int) ?=> i)
44
val fx1: 1 = f.x
55
val fx2: 1 = f._1
66
val fy1: Int = f.y(using 1)

tests/pos/i5966.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object Test {
2-
def foo = (using v: Int) => (x: Int) => v + x
2+
def foo = (v: Int) ?=> (x: Int) => v + x
33
given myInt as Int = 4
44

55
foo.apply(1)

tests/pos/i6863/lib_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
trait Ctx
2-
inline def foo(): Unit = (using x: Ctx) => ()
2+
inline def foo(): Unit = (x: Ctx) ?=> ()

tests/pos/ift-assign.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Context
22

33
object Test {
4-
var f: Context ?=> String = ((using _) => "")
4+
var f: Context ?=> String = (_ ?=> "")
55

66
f = f
77

tests/pos/inline-apply.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object Test {
55
def transform()(implicit ctx: Context) = {
66
inline def withLocalOwner[T](op: Context ?=> T) = op(using ctx)
77

8-
withLocalOwner { (using ctx) => }
8+
withLocalOwner { ctx ?=> }
99

1010
}
1111
}

tests/pos/reference/delegates.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ object Instances extends Common:
7878
println(minimum(xs))
7979

8080
case class Context(value: String)
81-
val c0: Context ?=> String = (using ctx) => ctx.value
82-
val c1: Context ?=> String = (using ctx: Context) => ctx.value
81+
val c0: Context ?=> String = ctx ?=> ctx.value
82+
val c1: Context ?=> String = (ctx: Context) ?=> ctx.value
8383

8484
class A
8585
class B
86-
val ab: (x: A, y: B) ?=> Int = (using a: A, b: B) => 22
86+
val ab: (x: A, y: B) ?=> Int = (a: A, b: B) ?=> 22
8787

8888
trait TastyAPI:
8989
type Symbol

0 commit comments

Comments
 (0)