File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
src-bootstrapped/scala/quoted Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ package scala .quoted
2+
3+ @ deprecated(" Use `scala.quoted.Expr` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
4+ object Unlifted :
5+
6+ @ deprecated(" Use `scala.quoted.Expr.unapply` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
7+ def apply [T ](expr : Expr [T ])(using FromExpr [T ])(using Quotes ): Option [T ] =
8+ Expr .unapply(expr)
9+
10+ @ deprecated(" Use `scala.quoted.Exprs.unapply` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
11+ def unapply [T ](exprs : Seq [Expr [T ]])(using FromExpr [T ])(using Quotes ): Option [Seq [T ]] =
12+ Exprs .unapply(exprs)
13+
14+ end Unlifted
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
3131 */
3232 def matches (that : Expr [Any ]): Boolean
3333
34+ @ deprecated(" Use `.value` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
35+ def unlift (using FromExpr [T ]): Option [T ] = self.value
36+
37+ @ deprecated(" Use `.unliftOrError` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
38+ def unliftOrError (using FromExpr [T ]): T = self.valueOrError
39+
3440 /** Return the value of this expression.
3541 *
3642 * Returns `None` if the expression does not represent a value or possibly contains side effects.
You can’t perform that action at this time.
0 commit comments