Skip to content

Commit 053bb24

Browse files
committed
Deprecate Expr.valueOrError
1 parent cb86e3b commit 053bb24

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

library/src/scala/quoted/Quotes.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
4848
given Quotes = Quotes.this
4949
summon[FromExpr[T]].unapply(self)
5050

51+
/** Return the value of this expression.
52+
*
53+
* Emits an error and throws if the expression does not represent a value or possibly contains side effects.
54+
* Otherwise returns the value.
55+
*/
56+
@deprecated("Use valueOrThrow", ">3.0.0-RC2")
57+
inline def valueOrError(using inline e: FromExpr[T]): T =
58+
valueOrThrow
59+
5160
/** Return the value of this expression.
5261
*
5362
* Emits an error and throws if the expression does not represent a value or possibly contains side effects.

0 commit comments

Comments
 (0)