Unlifted
extends Object with SerializableValue expressions
Supertypes
Object, SerializableMembers
def
unapply
[T] ( expr: Expr[T] ) ( implicit unlift: Unliftable[T] , qxtc: QuoteContext ) : Option[T]Matches expressions containing values and extracts the value.
Usage:
Matches expressions containing values and extracts the value.
Usage:
(x: Expr[B]) match {
case Unlifted(value) => ... // value: B
}
def
unapply
[T] ( exprs: Seq[Expr[T]] ) ( implicit unlift: Unliftable[T] , qctx: QuoteContext ) : Option[Seq[T]]Matches literal sequence of literal constant value expressions and return a sequence of values.
Usage:
Matches literal sequence of literal constant value expressions and return a sequence of values.
Usage:
inline def sum(args: Int*): Int = ${ sumExpr('args) }
def sumExpr(argsExpr: Expr[Seq[Int]])(using QuoteContext): Expr[Int] = argsExpr match
case Varargs(Unlifted(args)) =>
// args: Seq[Int]
...
}