File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
src-bootstrapped/scala/quoted Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ object FromExpr {
136136 */
137137 given StringContextFromExpr : FromExpr [StringContext ] with {
138138 def unapply (x : Expr [StringContext ])(using Quotes ) = x match {
139- case ' { new StringContext ($ {Varargs (Consts (args))}: _* ) } => Some (StringContext (args : _* ))
140- case ' { StringContext ($ {Varargs (Consts (args))}: _* ) } => Some (StringContext (args : _* ))
139+ case ' { new StringContext ($ {Varargs (Exprs (args))}: _* ) } => Some (StringContext (args : _* ))
140+ case ' { StringContext ($ {Varargs (Exprs (args))}: _* ) } => Some (StringContext (args : _* ))
141141 case _ => None
142142 }
143143 }
Original file line number Diff line number Diff line change 11package scala .quoted
22
33/** Literal constant values */
4+ @ deprecated(" Use `scala.quoted.Expr` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
45object Const {
56
67 /** Matches expressions containing literal constant values and extracts the value.
@@ -18,6 +19,7 @@ object Const {
1819 *
1920 * To directly unlift an expression `expr: Expr[T]` consider using `expr.value`/`expr.valueOrError` insead.
2021 */
22+ @ deprecated(" Use `scala.quoted.Expr.unapply` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
2123 def unapply [T ](expr : Expr [T ])(using Quotes ): Option [T ] = {
2224 import quotes .reflect ._
2325 def rec (tree : Term ): Option [T ] = tree match {
Original file line number Diff line number Diff line change 11package scala .quoted
22
33/** Literal constant values */
4+ @ deprecated(" Use `scala.quoted.Exprs` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
45object Consts {
56
67 /** Matches literal sequence of literal constant value expressions and return a sequence of values.
@@ -17,6 +18,7 @@ object Consts {
1718 *
1819 * To directly unlift all expressions in a sequence `exprs: Seq[Expr[T]]` consider using `exprs.map(_.value)`/`exprs.map(_.valueOrError)` insead.
1920 */
21+ @ deprecated(" Use `scala.quoted.Exprs.unapply` instead. This will be removed in 3.0.0-RC1" , " 3.0.0-M3" )
2022 def unapply [T ](exprs : Seq [Expr [T ]])(using Quotes ): Option [Seq [T ]] =
2123 exprs.foldRight(Option (List .empty[T ])) { (elem, acc) =>
2224 (elem, acc) match {
You can’t perform that action at this time.
0 commit comments