Skip to content

Commit deb317f

Browse files
committed
Update Unliftable API
* Align with Liftable API definitions * Simplify implementation signatures
1 parent 5274c48 commit deb317f

File tree

6 files changed

+46
-46
lines changed

6 files changed

+46
-46
lines changed

library/src-bootstrapped/scala/quoted/Expr.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ object Expr {
5656
* Otherwise returns the `Some` of the value.
5757
*/
5858
def unlift(using qctx: QuoteContext, unlift: Unliftable[T]): Option[T] =
59-
unlift(expr)
59+
unlift.fromExpr(expr)
6060

6161
/** Return the unlifted value of this expression.
6262
*
@@ -67,7 +67,7 @@ object Expr {
6767
def reportError =
6868
val msg = s"Expected a known value. \n\nThe value of: ${expr.show}\ncould not be unlifted using $unlift"
6969
report.throwError(msg, expr)
70-
unlift(expr).getOrElse(reportError)
70+
unlift.fromExpr(expr).getOrElse(reportError)
7171
end extension
7272

7373
/** `e.betaReduce` returns an expression that is functionally equivalent to `e`,

0 commit comments

Comments
 (0)