Skip to content

Commit 2f461f8

Browse files
committed
Update tests to use new syntax
1 parent 34afeee commit 2f461f8

File tree

147 files changed

+392
-398
lines changed

Some content is hidden

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

147 files changed

+392
-398
lines changed

tests/bench/string-interpolation-macro/Macro.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ object Macro {
99
var res: Expr[String] = null
1010
for _ <- 0 to 5_000 do
1111
(strCtxExpr, argsExpr) match {
12-
case ('{ StringContext(${Varargs(Exprs(parts))}: _*) }, Varargs(Exprs(args))) =>
13-
res = Expr(StringContext(parts: _*).s(args: _*))
12+
case ('{ StringContext(${Varargs(Exprs(parts))}*) }, Varargs(Exprs(args))) =>
13+
res = Expr(StringContext(parts*).s(args*))
1414
case _ => ???
1515
}
1616
res

tests/fuzzy/86ffb5f29d6fcab5893656be0307f2b8933b1498.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ def i1: Unit = {
33
val i2: Unit = {
44
def this(i3: Int): Unit => Unit = {
55
val i4 = 0
6-
i3(i2) = i3.i5 contains i4+ 1 else 1 + (i4: _*) * (0 i5 else i7 = + (classOf) < [Int](2)) }
6+
i3(i2) = i3.i5 contains i4+ 1 else 1 + (i4*) * (0 i5 else i7 = + (classOf) < [Int](2)) }
77
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
class I0 { List(null: _*) }
1+
class I0 { List(null*) }

tests/fuzzy/ba77fdb2a05d078e9c400f45d1fe12fa769a1c1f.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import language.List
22
class i0 {
33
def main(i1: Array[String]): Unit =
44
try {
5-
case List(_, _: _*) => 0 case List(1, 2) => i2 :: i1 - 1 }
5+
case List(_, _*) => 0 case List(1, 2) => i2 :: i1 - 1 }
66
println()
77
case _
88
(1

tests/fuzzy/ed71e8db3233023ed7a8795d01bbc03b6b063a8b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class i0 {
22
def i1: Nothing = {
3-
def this(i2: Dynamic): Int = i2.i3(i4: _*)
3+
def this(i2: Dynamic): Int = i2.i3(i4*)
44
}
55
}
66
var i3 = 0

tests/init/crash/i6858.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
object Test extends App {
2-
inline def foo(ys: Int*): Unit = bar(ys: _*)
2+
inline def foo(ys: Int*): Unit = bar(ys*)
33
def bar(ys: Int*) = ()
44

55
val xs: Array[Int] = new Array[Int](3)
6-
foo(xs: _*)
6+
foo(xs*)
77

88
val ys: Seq[Int] = new Array[Int](3)
9-
foo(ys: _*)
9+
foo(ys*)
1010
}

tests/neg-macros/i6432/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object Macro {
88
def impl(sc: Expr[StringContext])(using Quotes) : Expr[Unit] = {
99
import quotes.reflect._
1010
sc match {
11-
case '{ StringContext(${Varargs(parts)}: _*) } =>
11+
case '{ StringContext(${Varargs(parts)}*) } =>
1212
for (part @ Expr(s) <- parts)
1313
report.error(s, part.asTerm.pos)
1414
}

tests/neg-macros/i6432b/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object Macro {
88
def impl(sc: Expr[StringContext])(using Quotes) : Expr[Unit] = {
99
import quotes.reflect._
1010
sc match {
11-
case '{ StringContext(${Varargs(parts)}: _*) } =>
11+
case '{ StringContext(${Varargs(parts)}*) } =>
1212
for (part @ Expr(s) <- parts)
1313
report.error(s, part.asTerm.pos)
1414
}

tests/neg-macros/i6436.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- Error: tests/neg-macros/i6436.scala:5:9 -----------------------------------------------------------------------------
2-
5 | case '{ StringContext(${Varargs(parts)}: _*) } => // error
3-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
5 | case '{ StringContext(${Varargs(parts)}*) } => // error
3+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
| no implicit argument of type scala.quoted.Quotes was found
55
-- [E006] Not Found Error: tests/neg-macros/i6436.scala:6:34 -----------------------------------------------------------
66
6 | val ps: Seq[Expr[String]] = parts // error

tests/neg-macros/i6436.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.quoted._
22

33
def f(sc: quoted.Expr[StringContext]): Unit = {
44
sc match {
5-
case '{ StringContext(${Varargs(parts)}: _*) } => // error
5+
case '{ StringContext(${Varargs(parts)}*) } => // error
66
val ps: Seq[Expr[String]] = parts // error
77
}
88
}

0 commit comments

Comments
 (0)