Skip to content

Commit 1dbb191

Browse files
committed
Remove scala.quoted.show.apply and use Expr.show
`scala.quoted.show.apply` was only intorduced to reduce the diff in the tests. Instead we use the equivalent `run(expr.show.toExpr)` notation explicitly. This has the added advantage of showing explicitly where new compiler runs are located.
1 parent 2a91054 commit 1dbb191

Some content is hidden

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

44 files changed

+89
-101
lines changed

library/src/scala/quoted/show/package.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/disabled/reflect/run/position-val-def.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object Test {
1010
def test(expr: String): Unit = {
1111
val t = toolbox.parse(expr)
1212
println(expr)
13-
println(show(t, printPositions = true))
13+
println(run(t, printPositions = true.show.toExpr))
1414
println()
1515
}
1616
val tests = """

tests/run-with-compiler/i3823-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ object Test {
55
val z: $t = $x
66
}
77
implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make(getClass.getClassLoader)
8-
println(show(f('{2})(Type.IntTag)))
8+
println(run(f('{2})(Type.IntTag).show.toExpr))
99
}
1010
}

tests/run-with-compiler/i3823-c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ object Test {
55
val z = $x
66
}
77
implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make(getClass.getClassLoader)
8-
println(show(f('{2})(Type.IntTag)))
8+
println(run(f('{2})(Type.IntTag).show.toExpr))
99
}
1010
}

tests/run-with-compiler/i3823.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ object Test {
55
val z: $t = $x
66
}
77
implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make(getClass.getClassLoader)
8-
println(show(f('{2})('[Int])))
8+
println(run(f('{2})('[Int]).show.toExpr))
99
}
1010
}

tests/run-with-compiler/i3847-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ object Test {
1818
import Arrays._
1919
implicit val ct: Expr[ClassTag[Int]] = '{ClassTag.Int}
2020
val arr: Expr[Array[List[Int]]] = Array[List[Int]](List(1, 2, 3)).toExpr
21-
println(show(arr))
21+
println(run(arr.show.toExpr))
2222
}
2323
}

tests/run-with-compiler/i3847.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ object Test {
1818
import Arrays._
1919
implicit val ct: Expr[ClassTag[Int]] = '{ClassTag.Int}
2020
val arr: Expr[Array[Int]] = Array[Int](1, 2, 3).toExpr
21-
println(show(arr))
21+
println(run(arr.show.toExpr))
2222
}
2323
}

tests/run-with-compiler/i3876-b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ object Test {
1111
}
1212

1313
println(run(f2(x)))
14-
println(show(f2(x)))
14+
println(run(f2(x).show.toExpr))
1515
}
1616
}

tests/run-with-compiler/i3876-c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ object Test {
1111
}
1212

1313
println(run(f3(x)))
14-
println(show(f3(x))) // TODO improve printer
14+
println(run(f3(x).show.toExpr)) // TODO improve printer
1515
}
1616
}

tests/run-with-compiler/i3876-d.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object Test {
99
inlineLambda
1010
}
1111
println(run(f4(x)))
12-
println(show(f4(x)))
12+
println(run(f4(x).show.toExpr))
1313
}
1414

1515
inline def inlineLambda <: Int => Int = x => x + x

0 commit comments

Comments
 (0)