diff --git a/library/src/scala/quoted/Liftable.scala b/library/src/scala/quoted/Liftable.scala index f1f01a60bd93..2419f44405e1 100644 --- a/library/src/scala/quoted/Liftable.scala +++ b/library/src/scala/quoted/Liftable.scala @@ -20,7 +20,6 @@ object Liftable { def toExpr(implicit liftable: Liftable[T]): Expr[T] = liftable.toExpr(x) } - implicit def UnitIsLiftable: Liftable[Unit] = (x: Unit) => new ValueExpr(x) implicit def BooleanIsLiftable: Liftable[Boolean] = (x: Boolean) => new ValueExpr(x) implicit def ByteLiftable: Liftable[Byte] = (x: Byte) => new ValueExpr(x) implicit def CharIsLiftable: Liftable[Char] = (x: Char) => new ValueExpr(x) diff --git a/tests/pos/macro-with-type/Macro_1.scala b/tests/pos/macro-with-type/Macro_1.scala index 5bf5885b3aa1..f6da5bf47794 100644 --- a/tests/pos/macro-with-type/Macro_1.scala +++ b/tests/pos/macro-with-type/Macro_1.scala @@ -1,5 +1,5 @@ import scala.quoted._ object Macro { inline def ff: Unit = ~impl('[Int]) - def impl(t: Type[Int]): Expr[Unit] = () -} \ No newline at end of file + def impl(t: Type[Int]): Expr[Unit] = '() +} diff --git a/tests/pos/quote-liftable.scala b/tests/pos/quote-liftable.scala index fd4f12d26b41..0388a1da6432 100644 --- a/tests/pos/quote-liftable.scala +++ b/tests/pos/quote-liftable.scala @@ -33,7 +33,6 @@ object Test { (1.0f: Expr[Float]) (1.0: Expr[Double]) ("abc": Expr[String]) - ((): Expr[Unit]) val xs: Expr[List[Int]] = 1 :: 2 :: 3 :: Nil } diff --git a/tests/run-with-compiler/i3946.scala b/tests/run-with-compiler/i3946.scala index 2802b016c4f8..4aed7255379c 100644 --- a/tests/run-with-compiler/i3946.scala +++ b/tests/run-with-compiler/i3946.scala @@ -2,7 +2,7 @@ import dotty.tools.dotc.quoted.Toolbox._ import scala.quoted._ object Test { def main(args: Array[String]): Unit = { - val u: Expr[Unit] = () + val u: Expr[Unit] = '() println(u.show) println(u.run) } diff --git a/tests/run-with-compiler/quote-show-blocks-raw.scala b/tests/run-with-compiler/quote-show-blocks-raw.scala index cb42ee211e18..f41be403d69b 100644 --- a/tests/run-with-compiler/quote-show-blocks-raw.scala +++ b/tests/run-with-compiler/quote-show-blocks-raw.scala @@ -12,14 +12,14 @@ object Test { if (n == 0) x else a(n - 1, '{ println(~n.toExpr); ~x }) - println(a(5, ()).show) + println(a(5, '()).show) def b(n: Int, x: Expr[Unit]): Expr[Unit] = if (n == 0) x else b(n - 1, '{ ~x; println(~n.toExpr) }) - println(b(5, ()).show) + println(b(5, '()).show) } } diff --git a/tests/run-with-compiler/quote-show-blocks.scala b/tests/run-with-compiler/quote-show-blocks.scala index 0cbac3d943fe..0c99149934f8 100644 --- a/tests/run-with-compiler/quote-show-blocks.scala +++ b/tests/run-with-compiler/quote-show-blocks.scala @@ -11,14 +11,14 @@ object Test { if (n == 0) x else a(n - 1, '{ println(~n.toExpr); ~x }) - println(a(5, ()).show) + println(a(5, '()).show) def b(n: Int, x: Expr[Unit]): Expr[Unit] = if (n == 0) x else b(n - 1, '{ ~x; println(~n.toExpr) }) - println(b(5, ()).show) + println(b(5, '()).show) } }