diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala b/compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala index b92c96ae1b69..8bb791616a69 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuoteDriver.scala @@ -7,6 +7,8 @@ import dotty.tools.io.{AbstractFile, Directory, PlainDirectory, VirtualDirectory import dotty.tools.repl.AbstractFileClassLoader import scala.quoted.{Expr, Type} +import scala.quoted.Toolbox + import java.net.URLClassLoader import dotty.tools.dotc.tastyreflect.TastyImpl @@ -16,7 +18,7 @@ class QuoteDriver extends Driver { private[this] val contextBase: ContextBase = new ContextBase - def run[T](expr: Expr[T], settings: ToolboxSettings): T = { + def run[T](expr: Expr[T], settings: Toolbox.Settings): T = { val outDir: AbstractFile = settings.outDir match { case Some(out) => val dir = Directory(out) @@ -41,15 +43,15 @@ class QuoteDriver extends Driver { method.invoke(instance).asInstanceOf[T] } - def show(expr: Expr[_], settings: ToolboxSettings): String = { + def show(expr: Expr[_], settings: Toolbox.Settings): String = { def show(tree: Tree, ctx: Context): String = { - val tree1 = if (settings.rawTree) tree else (new TreeCleaner).transform(tree)(ctx) + val tree1 = if (settings.showRawTree) tree else (new TreeCleaner).transform(tree)(ctx) new TastyImpl(ctx).showSourceCode.showTree(tree1)(ctx) } withTree(expr, show, settings) } - def withTree[T](expr: Expr[_], f: (Tree, Context) => T, settings: ToolboxSettings): T = { + def withTree[T](expr: Expr[_], f: (Tree, Context) => T, settings: Toolbox.Settings): T = { val (_, ctx: Context) = setup(settings.compilerArgs.toArray :+ "dummy.scala", initCtx.fresh) var output: Option[T] = None @@ -61,7 +63,7 @@ class QuoteDriver extends Driver { output.getOrElse(throw new Exception("Could not extract " + expr)) } - def withTypeTree[T](tpe: Type[_], f: (TypTree, Context) => T, settings: ToolboxSettings): T = { + def withTypeTree[T](tpe: Type[_], f: (TypTree, Context) => T, settings: Toolbox.Settings): T = { val (_, ctx: Context) = setup(settings.compilerArgs.toArray :+ "dummy.scala", initCtx.fresh) var output: Option[T] = None diff --git a/compiler/src/dotty/tools/dotc/quoted/Toolbox.scala b/compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala similarity index 84% rename from compiler/src/dotty/tools/dotc/quoted/Toolbox.scala rename to compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala index 827157f5f3e2..04d8c255f0e8 100644 --- a/compiler/src/dotty/tools/dotc/quoted/Toolbox.scala +++ b/compiler/src/dotty/tools/dotc/quoted/ToolboxImpl.scala @@ -6,10 +6,10 @@ import scala.quoted.Expr import scala.quoted.Exprs.{LiftedExpr, TastyTreeExpr} /** Default runners for quoted expressions */ -object Toolbox { +object ToolboxImpl { import tpd._ - implicit def make(implicit settings: ToolboxSettings): scala.quoted.Toolbox = new scala.quoted.Toolbox { + def make(settings: scala.quoted.Toolbox.Settings): scala.quoted.Toolbox = new scala.quoted.Toolbox { private[this] val driver: QuoteDriver = new QuoteDriver() diff --git a/compiler/src/dotty/tools/dotc/quoted/ToolboxSettings.scala b/compiler/src/dotty/tools/dotc/quoted/ToolboxSettings.scala deleted file mode 100644 index 45f4db2db7cd..000000000000 --- a/compiler/src/dotty/tools/dotc/quoted/ToolboxSettings.scala +++ /dev/null @@ -1,22 +0,0 @@ -package dotty.tools.dotc.quoted - -class ToolboxSettings private (val outDir: Option[String], val rawTree: Boolean, val compilerArgs: List[String]) - -object ToolboxSettings { - - implicit def default: ToolboxSettings = make() - - /** Make toolbox settings - * @param outDir Output directory for the compiled quote. If set to None the output will be in memory - * @param color Print output with colors - * @param rawTree Do not remove quote tree artifacts - * @param compilerArgs Compiler arguments. Use only if you know what you are doing. - */ - def make( - color: Boolean = false, - rawTree: Boolean = false, - outDir: Option[String] = None, - compilerArgs: List[String] = Nil - ): ToolboxSettings = - new ToolboxSettings(outDir, rawTree, compilerArgs) -} diff --git a/library/src/scala/quoted/Toolbox.scala b/library/src/scala/quoted/Toolbox.scala index 066eabd14c74..fb00737220b4 100644 --- a/library/src/scala/quoted/Toolbox.scala +++ b/library/src/scala/quoted/Toolbox.scala @@ -2,8 +2,56 @@ package scala.quoted import scala.annotation.implicitNotFound -@implicitNotFound("Could not find implicit quoted.Toolbox.\n\nDefault toolbox can be instantiated with:\n `implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make`\n\nIf only needed once it can also be imported with:\n `import dotty.tools.dotc.quoted.Toolbox._`") +@implicitNotFound("Could not find implicit quoted.Toolbox.\n\nDefault toolbox can be instantiated with:\n `implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make`\n\nIf only needed once it can also be imported with:\n `import scala.quoted.Toolbox.Default._`") trait Toolbox { def run[T](expr: Expr[T]): T def show[T](expr: Expr[T]): String } + +object Toolbox { + + object Default { + // TODO remove? It may be better to only have one way to instantiate the toolbox + implicit def make(implicit settings: Settings): Toolbox = Toolbox.make + } + + def make(implicit settings: Settings): Toolbox = { + val cl = getClass.getClassLoader + try { + val toolboxImplCls = cl.loadClass("dotty.tools.dotc.quoted.ToolboxImpl") + val makeMeth = toolboxImplCls.getMethod("make", classOf[Settings]) + makeMeth.invoke(null, settings).asInstanceOf[Toolbox] + } + catch { + case ex: ClassNotFoundException => + throw new ToolboxNotFoundException( + s"""Could not load the Toolbox class `${ex.getMessage}` from the JVM classpath. Make sure that the compiler is on the JVM classpath.""", + ex + ) + } + } + + /** Setting of the Toolbox instance. */ + class Settings private (val outDir: Option[String], val showRawTree: Boolean, val compilerArgs: List[String]) + + object Settings { + + implicit def default: Settings = make() + + /** Make toolbox settings + * @param outDir Output directory for the compiled quote. If set to None the output will be in memory + * @param color Print output with colors + * @param showRawTree Do not remove quote tree artifacts + * @param compilerArgs Compiler arguments. Use only if you know what you are doing. + */ + def make( // TODO avoid using default parameters (for binary compat) + color: Boolean = false, + showRawTree: Boolean = false, + outDir: Option[String] = None, + compilerArgs: List[String] = Nil + ): Settings = + new Settings(outDir, showRawTree, compilerArgs) + } + + class ToolboxNotFoundException(msg: String, cause: ClassNotFoundException) extends Exception(msg, cause) +} diff --git a/tests/neg-with-compiler/quote-run-in-macro-1/quoted_1.scala b/tests/neg-with-compiler/quote-run-in-macro-1/quoted_1.scala index aa9191e1167f..80b58e4c84bb 100644 --- a/tests/neg-with-compiler/quote-run-in-macro-1/quoted_1.scala +++ b/tests/neg-with-compiler/quote-run-in-macro-1/quoted_1.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Macros { transparent def foo(i: => Int): Int = ~{ diff --git a/tests/neg-with-compiler/quote-run-in-macro-2/quoted_1.scala b/tests/neg-with-compiler/quote-run-in-macro-2/quoted_1.scala index aa9191e1167f..80b58e4c84bb 100644 --- a/tests/neg-with-compiler/quote-run-in-macro-2/quoted_1.scala +++ b/tests/neg-with-compiler/quote-run-in-macro-2/quoted_1.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Macros { transparent def foo(i: => Int): Int = ~{ diff --git a/tests/pos-with-compiler/quote-0.scala b/tests/pos-with-compiler/quote-0.scala index cd90e9c24483..bdb64a6bf26c 100644 --- a/tests/pos-with-compiler/quote-0.scala +++ b/tests/pos-with-compiler/quote-0.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Macros { diff --git a/tests/pos-with-compiler/quote-assert/quoted_2.scala b/tests/pos-with-compiler/quote-assert/quoted_2.scala index 6c14e51241f7..c5525f86781b 100644 --- a/tests/pos-with-compiler/quote-assert/quoted_2.scala +++ b/tests/pos-with-compiler/quote-assert/quoted_2.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ import Macros._ diff --git a/tests/run-with-compiler-custom-args/staged-streams_1.scala b/tests/run-with-compiler-custom-args/staged-streams_1.scala index ef2f2a6b86ee..eac8d5f3c003 100644 --- a/tests/run-with-compiler-custom-args/staged-streams_1.scala +++ b/tests/run-with-compiler-custom-args/staged-streams_1.scala @@ -673,7 +673,7 @@ object Test { .fold('{0}, ((a: Expr[Int], b : Expr[Int]) => '{ ~a + ~b })) def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make println(test1().run) println diff --git a/tests/run-with-compiler/i3823-b.scala b/tests/run-with-compiler/i3823-b.scala index 088861972518..f12d6dbd9141 100644 --- a/tests/run-with-compiler/i3823-b.scala +++ b/tests/run-with-compiler/i3823-b.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/i3823-c.scala b/tests/run-with-compiler/i3823-c.scala index d493e1a5d831..976ac729987f 100644 --- a/tests/run-with-compiler/i3823-c.scala +++ b/tests/run-with-compiler/i3823-c.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/i3823.scala b/tests/run-with-compiler/i3823.scala index 418b2aae6fb1..55a4f88256c3 100644 --- a/tests/run-with-compiler/i3823.scala +++ b/tests/run-with-compiler/i3823.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/i3847-b.scala b/tests/run-with-compiler/i3847-b.scala index d444e65d63e9..6e06d1c3da55 100644 --- a/tests/run-with-compiler/i3847-b.scala +++ b/tests/run-with-compiler/i3847-b.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ import scala.reflect.ClassTag diff --git a/tests/run-with-compiler/i3847.scala b/tests/run-with-compiler/i3847.scala index 83c5d8f1520e..1aef635e21e3 100644 --- a/tests/run-with-compiler/i3847.scala +++ b/tests/run-with-compiler/i3847.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ import scala.reflect.ClassTag diff --git a/tests/run-with-compiler/i3876-b.scala b/tests/run-with-compiler/i3876-b.scala index 876eaa7a226c..fc89db875075 100644 --- a/tests/run-with-compiler/i3876-b.scala +++ b/tests/run-with-compiler/i3876-b.scala @@ -1,8 +1,8 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val x: Expr[Int] = '(3) diff --git a/tests/run-with-compiler/i3876-c.scala b/tests/run-with-compiler/i3876-c.scala index 3ba15e3a6afc..6e3b5213f081 100644 --- a/tests/run-with-compiler/i3876-c.scala +++ b/tests/run-with-compiler/i3876-c.scala @@ -1,8 +1,8 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val x: Expr[Int] = '(3) diff --git a/tests/run-with-compiler/i3876-d.scala b/tests/run-with-compiler/i3876-d.scala index 153ac52e9d2b..aee19298a597 100644 --- a/tests/run-with-compiler/i3876-d.scala +++ b/tests/run-with-compiler/i3876-d.scala @@ -1,8 +1,8 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val x: Expr[Int] = '(3) diff --git a/tests/run-with-compiler/i3876.scala b/tests/run-with-compiler/i3876.scala index 13b951da2d07..67324b9518f1 100644 --- a/tests/run-with-compiler/i3876.scala +++ b/tests/run-with-compiler/i3876.scala @@ -1,8 +1,8 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val x: Expr[Int] = '(3) diff --git a/tests/run-with-compiler/i3946.scala b/tests/run-with-compiler/i3946.scala index 60fd96a9ee11..6a3108b2b298 100644 --- a/tests/run-with-compiler/i3946.scala +++ b/tests/run-with-compiler/i3946.scala @@ -1,8 +1,8 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val u: Expr[Unit] = '() println(u.show) diff --git a/tests/run-with-compiler/i3947.scala b/tests/run-with-compiler/i3947.scala index 513525e383f0..bd7f035fc2ae 100644 --- a/tests/run-with-compiler/i3947.scala +++ b/tests/run-with-compiler/i3947.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947b.scala b/tests/run-with-compiler/i3947b.scala index 3b4ef0cf70a1..9c05028d2a51 100644 --- a/tests/run-with-compiler/i3947b.scala +++ b/tests/run-with-compiler/i3947b.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947b2.scala b/tests/run-with-compiler/i3947b2.scala index 0f138899fabd..bfdc28ebb762 100644 --- a/tests/run-with-compiler/i3947b2.scala +++ b/tests/run-with-compiler/i3947b2.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947b3.scala b/tests/run-with-compiler/i3947b3.scala index 052dfa883cc7..4ad8cde804d1 100644 --- a/tests/run-with-compiler/i3947b3.scala +++ b/tests/run-with-compiler/i3947b3.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947c.scala b/tests/run-with-compiler/i3947c.scala index b63d954b969c..0c10f5aec330 100644 --- a/tests/run-with-compiler/i3947c.scala +++ b/tests/run-with-compiler/i3947c.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947d.scala b/tests/run-with-compiler/i3947d.scala index affcdb6c003d..c5acce46f697 100644 --- a/tests/run-with-compiler/i3947d.scala +++ b/tests/run-with-compiler/i3947d.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947d2.scala b/tests/run-with-compiler/i3947d2.scala index 59c9c742e918..9306704dbcaa 100644 --- a/tests/run-with-compiler/i3947d2.scala +++ b/tests/run-with-compiler/i3947d2.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947e.scala b/tests/run-with-compiler/i3947e.scala index 7cc8c1785d32..c8e9c24d651a 100644 --- a/tests/run-with-compiler/i3947e.scala +++ b/tests/run-with-compiler/i3947e.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947f.scala b/tests/run-with-compiler/i3947f.scala index 35c945685210..61063dfece13 100644 --- a/tests/run-with-compiler/i3947f.scala +++ b/tests/run-with-compiler/i3947f.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947g.scala b/tests/run-with-compiler/i3947g.scala index 8dad3bf4cbae..81a04f2e15e3 100644 --- a/tests/run-with-compiler/i3947g.scala +++ b/tests/run-with-compiler/i3947g.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947i.scala b/tests/run-with-compiler/i3947i.scala index df7091ca1559..6b314669009f 100644 --- a/tests/run-with-compiler/i3947i.scala +++ b/tests/run-with-compiler/i3947i.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i3947j.scala b/tests/run-with-compiler/i3947j.scala index e41bf2037a4e..1adaeabbb7dd 100644 --- a/tests/run-with-compiler/i3947j.scala +++ b/tests/run-with-compiler/i3947j.scala @@ -1,11 +1,11 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def test[T](clazz: java.lang.Class[T]): Unit = { val lclazz = clazz.toExpr diff --git a/tests/run-with-compiler/i4044a.scala b/tests/run-with-compiler/i4044a.scala index 1eaf534cb6cc..fc05dbcb8ed9 100644 --- a/tests/run-with-compiler/i4044a.scala +++ b/tests/run-with-compiler/i4044a.scala @@ -1,5 +1,5 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ class Foo { def foo: Unit = { diff --git a/tests/run-with-compiler/i4044b.scala b/tests/run-with-compiler/i4044b.scala index a7fab6ff914c..31facbff19ae 100644 --- a/tests/run-with-compiler/i4044b.scala +++ b/tests/run-with-compiler/i4044b.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ sealed abstract class VarRef[T] { def update(expr: Expr[T]): Expr[Unit] diff --git a/tests/run-with-compiler/i4044c.scala b/tests/run-with-compiler/i4044c.scala index b35fe58851bb..0071624d7ece 100644 --- a/tests/run-with-compiler/i4044c.scala +++ b/tests/run-with-compiler/i4044c.scala @@ -1,5 +1,5 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ class Foo { def foo: Unit = { diff --git a/tests/run-with-compiler/i4044d.scala b/tests/run-with-compiler/i4044d.scala index 6653af93d3d5..b1afb942253e 100644 --- a/tests/run-with-compiler/i4044d.scala +++ b/tests/run-with-compiler/i4044d.scala @@ -1,5 +1,5 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ class Foo { def foo: Unit = { diff --git a/tests/run-with-compiler/i4044e.scala b/tests/run-with-compiler/i4044e.scala index c3dcc631dc82..8e7ea90d6e67 100644 --- a/tests/run-with-compiler/i4044e.scala +++ b/tests/run-with-compiler/i4044e.scala @@ -1,5 +1,5 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ class Foo { def foo: Unit = { diff --git a/tests/run-with-compiler/i4044f.scala b/tests/run-with-compiler/i4044f.scala index 43372ff23938..59330937e8fb 100644 --- a/tests/run-with-compiler/i4044f.scala +++ b/tests/run-with-compiler/i4044f.scala @@ -1,5 +1,5 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ class Foo { def foo: Unit = { diff --git a/tests/run-with-compiler/i4350.scala b/tests/run-with-compiler/i4350.scala index 647190212fb0..126f89df2d6a 100644 --- a/tests/run-with-compiler/i4350.scala +++ b/tests/run-with-compiler/i4350.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted.Type @@ -8,7 +8,7 @@ class Foo[T: Type] { object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make println((new Foo[Object]).q.show) println((new Foo[String]).q.show) } diff --git a/tests/run-with-compiler/i4591.scala b/tests/run-with-compiler/i4591.scala index ad5119618c96..cfad307c2bfc 100644 --- a/tests/run-with-compiler/i4591.scala +++ b/tests/run-with-compiler/i4591.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { diff --git a/tests/run-with-compiler/quote-ackermann-1.scala b/tests/run-with-compiler/quote-ackermann-1.scala index 9b4f06506236..0e45816631e7 100644 --- a/tests/run-with-compiler/quote-ackermann-1.scala +++ b/tests/run-with-compiler/quote-ackermann-1.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { diff --git a/tests/run-with-compiler/quote-impure-by-name/quoted_1.scala b/tests/run-with-compiler/quote-impure-by-name/quoted_1.scala index 6e569fab4765..76d9afc3352f 100644 --- a/tests/run-with-compiler/quote-impure-by-name/quoted_1.scala +++ b/tests/run-with-compiler/quote-impure-by-name/quoted_1.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ class Index[K, Keys](val index: String) extends AnyVal { override def toString: String = index diff --git a/tests/run-with-compiler/quote-inline-function/quoted_1.scala b/tests/run-with-compiler/quote-inline-function/quoted_1.scala index 58f41a423995..545309d39ede 100644 --- a/tests/run-with-compiler/quote-inline-function/quoted_1.scala +++ b/tests/run-with-compiler/quote-inline-function/quoted_1.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Macros { diff --git a/tests/run-with-compiler/quote-lib.scala b/tests/run-with-compiler/quote-lib.scala index 688a7913b9d1..2031c329f714 100644 --- a/tests/run-with-compiler/quote-lib.scala +++ b/tests/run-with-compiler/quote-lib.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import liftable.Units._ import liftable.Lets._ @@ -11,7 +11,7 @@ import liftable.Exprs._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val liftedUnit: Expr[Unit] = '() diff --git a/tests/run-with-compiler/quote-nested-1.scala b/tests/run-with-compiler/quote-nested-1.scala index 410eaa835aae..5adc94754bea 100644 --- a/tests/run-with-compiler/quote-nested-1.scala +++ b/tests/run-with-compiler/quote-nested-1.scala @@ -1,5 +1,5 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/quote-nested-2.scala b/tests/run-with-compiler/quote-nested-2.scala index bdc8a01fa8b2..da69d4cf707c 100644 --- a/tests/run-with-compiler/quote-nested-2.scala +++ b/tests/run-with-compiler/quote-nested-2.scala @@ -1,5 +1,5 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/quote-nested-3.scala b/tests/run-with-compiler/quote-nested-3.scala index 15ef33e2e2c9..02170e2acd0b 100644 --- a/tests/run-with-compiler/quote-nested-3.scala +++ b/tests/run-with-compiler/quote-nested-3.scala @@ -1,5 +1,5 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/quote-nested-4.scala b/tests/run-with-compiler/quote-nested-4.scala index 49a4a0db587e..3642ba4f42a2 100644 --- a/tests/run-with-compiler/quote-nested-4.scala +++ b/tests/run-with-compiler/quote-nested-4.scala @@ -1,5 +1,5 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/quote-nested-5.scala b/tests/run-with-compiler/quote-nested-5.scala index 7d1bdd602343..902c2ae885b1 100644 --- a/tests/run-with-compiler/quote-nested-5.scala +++ b/tests/run-with-compiler/quote-nested-5.scala @@ -1,5 +1,5 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run-with-compiler/quote-owners-2.scala b/tests/run-with-compiler/quote-owners-2.scala index f5017b45a840..78db786a24e6 100644 --- a/tests/run-with-compiler/quote-owners-2.scala +++ b/tests/run-with-compiler/quote-owners-2.scala @@ -1,10 +1,10 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val q = f(g(Type.IntTag)) println(q.run) diff --git a/tests/run-with-compiler/quote-owners.scala b/tests/run-with-compiler/quote-owners.scala index 58047cbb9257..3c8496604694 100644 --- a/tests/run-with-compiler/quote-owners.scala +++ b/tests/run-with-compiler/quote-owners.scala @@ -1,9 +1,9 @@ import quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val q = f println(q.run) diff --git a/tests/run-with-compiler/quote-run-2.scala b/tests/run-with-compiler/quote-run-2.scala index 479415109a04..7febe1ded44d 100644 --- a/tests/run-with-compiler/quote-run-2.scala +++ b/tests/run-with-compiler/quote-run-2.scala @@ -1,11 +1,11 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def powerCode(n: Int, x: Expr[Double]): Expr[Double] = if (n == 0) '(1.0) diff --git a/tests/run-with-compiler/quote-run-b.scala b/tests/run-with-compiler/quote-run-b.scala index 957388374111..7d97a58fd8ef 100644 --- a/tests/run-with-compiler/quote-run-b.scala +++ b/tests/run-with-compiler/quote-run-b.scala @@ -1,11 +1,11 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val lambdaExpr = '{ (x: Int) => println("lambda(" + x + ")") diff --git a/tests/run-with-compiler/quote-run-c.scala b/tests/run-with-compiler/quote-run-c.scala index c52639f2b4ff..999c0862c618 100644 --- a/tests/run-with-compiler/quote-run-c.scala +++ b/tests/run-with-compiler/quote-run-c.scala @@ -1,11 +1,11 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val classExpr = '{ class A { diff --git a/tests/run-with-compiler/quote-run-constants.scala b/tests/run-with-compiler/quote-run-constants.scala index 997ac779e1be..5ff7465379bc 100644 --- a/tests/run-with-compiler/quote-run-constants.scala +++ b/tests/run-with-compiler/quote-run-constants.scala @@ -1,11 +1,11 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def run[T](expr: Expr[T]): Unit = println(expr.run) def show[T](expr: Expr[T]): Unit = println(expr.show) diff --git a/tests/run-with-compiler/quote-run-large.scala b/tests/run-with-compiler/quote-run-large.scala index 46e90e29a3b1..ac21bddc7d23 100644 --- a/tests/run-with-compiler/quote-run-large.scala +++ b/tests/run-with-compiler/quote-run-large.scala @@ -1,4 +1,4 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted.Exprs.TastyExpr diff --git a/tests/run-with-compiler/quote-run-many.scala b/tests/run-with-compiler/quote-run-many.scala index 9525ecaa14fa..2a661d493df2 100644 --- a/tests/run-with-compiler/quote-run-many.scala +++ b/tests/run-with-compiler/quote-run-many.scala @@ -2,7 +2,7 @@ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def expr(i: Int) = '{ val a = 3 + ~i.toExpr diff --git a/tests/run-with-compiler/quote-run-staged-interpreter.scala b/tests/run-with-compiler/quote-run-staged-interpreter.scala index 5f580fd82d21..9af5dcde96a1 100644 --- a/tests/run-with-compiler/quote-run-staged-interpreter.scala +++ b/tests/run-with-compiler/quote-run-staged-interpreter.scala @@ -1,6 +1,6 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ enum Exp { case Num(n: Int) diff --git a/tests/run-with-compiler/quote-run-with-settings.scala b/tests/run-with-compiler/quote-run-with-settings.scala index 1efe50ec45c7..493f312740d2 100644 --- a/tests/run-with-compiler/quote-run-with-settings.scala +++ b/tests/run-with-compiler/quote-run-with-settings.scala @@ -1,14 +1,14 @@ import java.nio.file.{Files, Paths} -import dotty.tools.dotc.quoted.Toolbox._ -import dotty.tools.dotc.quoted.ToolboxSettings +import scala.quoted.Toolbox.Default._ +import scala.quoted.Toolbox import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val expr = '{ val a = 3 println("foo") @@ -24,8 +24,8 @@ object Test { Files.deleteIfExists(classFile) { - implicit val settings = ToolboxSettings.make(outDir = Some(outDir.toString)) - implicit val toolbox2: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val settings = Toolbox.Settings.make(outDir = Some(outDir.toString)) + implicit val toolbox2: scala.quoted.Toolbox = scala.quoted.Toolbox.make println(expr.run) assert(Files.exists(classFile)) } diff --git a/tests/run-with-compiler/quote-run.scala b/tests/run-with-compiler/quote-run.scala index 45ee3e3fabf4..a4cd3268a109 100644 --- a/tests/run-with-compiler/quote-run.scala +++ b/tests/run-with-compiler/quote-run.scala @@ -1,11 +1,11 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val expr = '{ val a = 3 diff --git a/tests/run-with-compiler/quote-show-blocks-raw.scala b/tests/run-with-compiler/quote-show-blocks-raw.scala index 31770a9c9f1f..20c142f4144e 100644 --- a/tests/run-with-compiler/quote-show-blocks-raw.scala +++ b/tests/run-with-compiler/quote-show-blocks-raw.scala @@ -1,12 +1,12 @@ -import dotty.tools.dotc.quoted.Toolbox._ -import dotty.tools.dotc.quoted.ToolboxSettings +import scala.quoted.Toolbox.Default._ +import scala.quoted.Toolbox import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val settings = ToolboxSettings.make(rawTree = true) + implicit val settings: Toolbox.Settings = Toolbox.Settings.make(showRawTree = true) def a(n: Int, x: Expr[Unit]): Expr[Unit] = if (n == 0) x diff --git a/tests/run-with-compiler/quote-show-blocks.scala b/tests/run-with-compiler/quote-show-blocks.scala index b7400cd53e24..cf0eef3f38c6 100644 --- a/tests/run-with-compiler/quote-show-blocks.scala +++ b/tests/run-with-compiler/quote-show-blocks.scala @@ -2,7 +2,7 @@ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def a(n: Int, x: Expr[Unit]): Expr[Unit] = if (n == 0) x diff --git a/tests/run-with-compiler/quote-two-captured-ref.scala b/tests/run-with-compiler/quote-two-captured-ref.scala index 19f8f8c2fa72..ce652e35c846 100644 --- a/tests/run-with-compiler/quote-two-captured-ref.scala +++ b/tests/run-with-compiler/quote-two-captured-ref.scala @@ -2,7 +2,7 @@ import quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make val q = '{ val x = 1 diff --git a/tests/run-with-compiler/quote-type-tags.scala b/tests/run-with-compiler/quote-type-tags.scala index 95a421637edd..27e4a86f062c 100644 --- a/tests/run-with-compiler/quote-type-tags.scala +++ b/tests/run-with-compiler/quote-type-tags.scala @@ -2,7 +2,7 @@ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def asof[T, U](x: Expr[T], t: Type[U]): Expr[U] = '((~x).asInstanceOf[~t]) diff --git a/tests/run-with-compiler/quote-unrolled-foreach.scala b/tests/run-with-compiler/quote-unrolled-foreach.scala index f14df3f516ff..f81697147c96 100644 --- a/tests/run-with-compiler/quote-unrolled-foreach.scala +++ b/tests/run-with-compiler/quote-unrolled-foreach.scala @@ -2,7 +2,7 @@ import scala.annotation.tailrec import scala.quoted._ object Test { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def main(args: Array[String]): Unit = { val code1 = '{ (arr: Array[Int], f: Int => Unit) => ~foreach1('(arr), '(f)) } diff --git a/tests/run-with-compiler/shonan-hmm-simple.scala b/tests/run-with-compiler/shonan-hmm-simple.scala index 2beb204e1694..a0b67ab62177 100644 --- a/tests/run-with-compiler/shonan-hmm-simple.scala +++ b/tests/run-with-compiler/shonan-hmm-simple.scala @@ -115,7 +115,7 @@ class Blas1[Idx, T](r: Ring[T], ops: VecOps[Idx, T]) { object Test { - implicit val toolbox: scala.quoted.Toolbox = dotty.tools.dotc.quoted.Toolbox.make + implicit val toolbox: scala.quoted.Toolbox = scala.quoted.Toolbox.make def main(args: Array[String]): Unit = { val arr1 = Array(0, 1, 2, 4, 8) diff --git a/tests/run-with-compiler/shonan-hmm/MVmult.scala b/tests/run-with-compiler/shonan-hmm/MVmult.scala index 303e4f71b2bf..f483b856e3c5 100644 --- a/tests/run-with-compiler/shonan-hmm/MVmult.scala +++ b/tests/run-with-compiler/shonan-hmm/MVmult.scala @@ -1,5 +1,5 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ class MVmult[Idx, T, Unt](tring: Ring[T], vec: VecROp[Idx, T, Unt]) { diff --git a/tests/run-with-compiler/shonan-hmm/Test.scala b/tests/run-with-compiler/shonan-hmm/Test.scala index 947836669602..38341199bd17 100644 --- a/tests/run-with-compiler/shonan-hmm/Test.scala +++ b/tests/run-with-compiler/shonan-hmm/Test.scala @@ -1,5 +1,5 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ // DYNAMIC diff --git a/tests/run-with-compiler/shonan-hmm/Vmults.scala b/tests/run-with-compiler/shonan-hmm/Vmults.scala index 6d2755503d6e..a3bf8a775451 100644 --- a/tests/run-with-compiler/shonan-hmm/Vmults.scala +++ b/tests/run-with-compiler/shonan-hmm/Vmults.scala @@ -1,5 +1,5 @@ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.quoted._ class Vmult[Idx, T, Unt](tring: Ring[T], vec: VecOp[Idx, Unt]) { diff --git a/tests/run-with-compiler/tasty-extractors-constants-2/quoted_1.scala b/tests/run-with-compiler/tasty-extractors-constants-2/quoted_1.scala index 9b49afae8d00..d959e26ab6c2 100644 --- a/tests/run-with-compiler/tasty-extractors-constants-2/quoted_1.scala +++ b/tests/run-with-compiler/tasty-extractors-constants-2/quoted_1.scala @@ -1,5 +1,5 @@ import scala.quoted._ -import dotty.tools.dotc.quoted.Toolbox._ +import scala.quoted.Toolbox.Default._ import scala.tasty._ import scala.tasty.util._