Consts
extends Object with SerializableLiteral constant values
Supertypes
Object, SerializableMembers
def
unapply
[T] ( exprs: Seq[Expr[T]] ) ( implicit 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]])(usingusing QuoteContext): Expr[Int] = argsExpr match
case Varargs(Consts(args)) =>
// args: Seq[Int]
...
}