NilFromExpr

scala.quoted.FromExpr.NilFromExpr
object NilFromExpr extends FromExpr[Nil.type]

Default implementation of FromExpr[Nil]

  • Transform '{Nil} into Some(Nil)
  • Otherwise returns None

Attributes

Source
FromExpr.scala
Graph
Supertypes
trait FromExpr[Nil.type]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def unapply(x: Expr[Nil.type])(using Quotes): Option[Nil.type]

Return the value of the expression.

Return the value of the expression.

Returns None if the expression does not represent a value or possibly contains side effects. Otherwise returns the Some of the value.

Attributes

Source
FromExpr.scala