ConstSeq
extends Object with SerializableLiteral sequence of literal constant value expressions
Supertypes
Object, SerializableMembers
def
unapply
[T] ( expr: Expr[Seq[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 ConstSeq(args) =>
// args: Seq[Int]
...
}