Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.quoted/Exprs

Exprs

scala.quoted.Exprs
objectExprs

Attributes

Source
Exprs.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
Exprs.type

Members list

Value members

Concrete methods

defunapply[T](exprs:Seq[Expr[T]])(usingFromExpr[T])(usingQuotes):Option[Seq[T]]

Matches literal sequence of literal constant value expressions and return a sequence of values.

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 Quotes): Expr[Int] = argsExpr match  case Varargs(Exprs(args)) => ???    // args: Seq[Int]

To directly get the value of all expressions in a sequenceexprs: Seq[Expr[T]] consider usingexprs.map(_.value)/exprs.map(_.valueOrError) instead.

Attributes

Source
Exprs.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp