Skip to content

Commit 5ce4475

Browse files
committed
Drop "delegate for" in tests
1 parent 2852095 commit 5ce4475

File tree

85 files changed

+88
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+88
-88
lines changed

tests/disabled/neg-with-compiler/quote-run-in-macro-2/quoted_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ object Macros {
55

66
inline def foo(i: => Int): Int = ${ fooImpl('i) }
77
def fooImpl(i: Expr[Int]) given QuoteContext: Expr[Int] = {
8-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
8+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
99
val y: Int = run(i)
1010
y
1111
}

tests/neg-staging/quote-run-in-macro-1/quoted_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import given scala.quoted.autolift._
44

55
object Macros {
66

7-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
7+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
88
inline def foo(i: => Int): Int = ${ fooImpl('i) }
99
def fooImpl(i: Expr[Int]) given QuoteContext: Expr[Int] = {
1010
val y: Int = run(i)

tests/pos-staging/quote-0.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object Macros {
2525

2626
class Test {
2727

28-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
28+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
2929

3030
run {
3131
val program = '{

tests/pos-staging/quote-assert/quoted_2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ object Test {
1717
${ assertImpl('{x != 0}) }
1818
}
1919

20-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
20+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
2121
run(program)
2222
}

tests/run-macros/quote-matcher-symantics-3/quoted_1.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object Macros {
1111

1212
type Env = Map[Any, Any]
1313

14-
delegate ev0 for Env = Map.empty
14+
given ev0 as Env = Map.empty
1515

1616
def envWith[T](id: Bind[T], ref: Expr[R[T]]) given (env: Env): Env =
1717
env.updated(id, ref)
@@ -41,11 +41,11 @@ object Macros {
4141
'{ $sym.ifThenElse[$t](${lift(cond)}, ${lift(thenp)}, ${lift(elsep)}) }.asInstanceOf[Expr[R[T]]]
4242

4343
case '{ ($x0: Int) => $body: Any } =>
44-
'{ $sym.lam((x: R[Int]) => ${delegate for Env = envWith(x0, 'x) given env; lift(body)}).asInstanceOf[R[T]] }
44+
'{ $sym.lam((x: R[Int]) => ${given as Env = envWith(x0, 'x) given env; lift(body)}).asInstanceOf[R[T]] }
4545
case '{ ($x0: Boolean) => $body: Any } =>
46-
'{ $sym.lam((x: R[Boolean]) => ${delegate for Env = envWith(x0, 'x) given env; lift(body)}).asInstanceOf[R[T]] }
46+
'{ $sym.lam((x: R[Boolean]) => ${given as Env = envWith(x0, 'x) given env; lift(body)}).asInstanceOf[R[T]] }
4747
case '{ ($x0: Int => Int) => $body: Any } =>
48-
'{ $sym.lam((x: R[Int => Int]) => ${delegate for Env = envWith(x0, 'x) given env; lift(body)}).asInstanceOf[R[T]] }
48+
'{ $sym.lam((x: R[Int => Int]) => ${given as Env = envWith(x0, 'x) given env; lift(body)}).asInstanceOf[R[T]] }
4949

5050
case '{ Symantics.fix[$t, $u]($f) } =>
5151
'{ $sym.fix[$t, $u]((x: R[$t => $u]) => $sym.app(${lift(f)}, x)).asInstanceOf[R[T]] }

tests/run-staging/i3823-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import scala.quoted._
22
import scala.quoted.staging._
33
object Test {
4-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
4+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
55
def main(args: Array[String]): Unit = withQuoteContext {
66
def f[T](x: Expr[T])(implicit t: Type[T]) = '{
77
val z: $t = $x

tests/run-staging/i3823-c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import scala.quoted._
22
import scala.quoted.staging._
33
object Test {
4-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
4+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
55
def main(args: Array[String]): Unit = withQuoteContext {
66
def f[T](x: Expr[T])(implicit t: Type[T]) = '{
77
val z = $x

tests/run-staging/i3823.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import scala.quoted._
22
import scala.quoted.staging._
33
object Test {
4-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
4+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
55
def main(args: Array[String]): Unit = withQuoteContext {
66
def f[T: Type](x: Expr[T])(t: Type[T]) = '{
77
val z: $t = $x

tests/run-staging/i3847-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ object Arrays {
1414
}
1515

1616
object Test {
17-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
17+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
1818
def main(args: Array[String]): Unit = withQuoteContext {
1919
import Arrays._
2020
implicit val ct: Expr[ClassTag[Int]] = '{ClassTag.Int}

tests/run-staging/i3876-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.quoted._
22
import scala.quoted.staging._
33
object Test {
44
def main(args: Array[String]): Unit = {
5-
delegate for Toolbox = Toolbox.make(getClass.getClassLoader)
5+
given as Toolbox = Toolbox.make(getClass.getClassLoader)
66

77
def x given QuoteContext: Expr[Int] = '{3}
88

0 commit comments

Comments
 (0)