Skip to content

Commit b750469

Browse files
Merge pull request #4135 from dotty-staging/move-toExpr
Move LiftExprOps to quoted package
2 parents b499a9a + d3dc9c5 commit b750469

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

library/src/scala/quoted/Liftable.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ abstract class Liftable[T] {
1515
* gives an alternative implementation using just the basic staging system.
1616
*/
1717
object Liftable {
18-
19-
implicit class LiftExprOps[T](val x: T) extends AnyVal {
20-
def toExpr(implicit liftable: Liftable[T]): Expr[T] = liftable.toExpr(x)
21-
}
22-
2318
implicit def BooleanIsLiftable: Liftable[Boolean] = (x: Boolean) => new ValueExpr(x)
2419
implicit def ByteLiftable: Liftable[Byte] = (x: Byte) => new ValueExpr(x)
2520
implicit def CharIsLiftable: Liftable[Char] = (x: Char) => new ValueExpr(x)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package scala
2+
3+
package object quoted {
4+
5+
implicit class LiftExprOps[T](val x: T) extends AnyVal {
6+
def toExpr(implicit ev: Liftable[T]): Expr[T] = ev.toExpr(x)
7+
}
8+
9+
}

tests/run-with-compiler/quote-lib.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ object Test {
4242

4343
package liftable {
4444
import scala.quoted.Liftable
45-
import scala.quoted.Liftable._
4645
import scala.reflect.ClassTag
4746

4847
object Exprs {

tests/run-with-compiler/quote-show-blocks-raw.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import dotty.tools.dotc.quoted.Toolbox._
33

44
import scala.quoted._
5-
import scala.quoted.Liftable._
65

76
object Test {
87
def main(args: Array[String]): Unit = {

tests/run-with-compiler/quote-show-blocks.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import dotty.tools.dotc.quoted.Toolbox._
33

44
import scala.quoted._
5-
import scala.quoted.Liftable._
65

76
object Test {
87
def main(args: Array[String]): Unit = {

0 commit comments

Comments
 (0)