O object

Consts

extends Object with Serializable

Literal constant values

Supertypes

Object, Serializable

Members

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]
    ...
}