Skip to content

Commit

Permalink
Deprecate reflect report throwXYZ API
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Aug 20, 2021
1 parent 6142700 commit 234dbbf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions library/src/scala/quoted/Quotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
* Emits an error and throws if the expression does not represent a value or possibly contains side effects.
* Otherwise returns the value.
*/
// TODO: deprecate after 3.1.x
// @deprecated("Use valueOrAbort", "3.2.0")
@deprecated("Use valueOrAbort", "3.1.0")
def valueOrError(using FromExpr[T]): T =
val fromExpr = summon[FromExpr[T]]
def reportError =
Expand Down Expand Up @@ -4201,18 +4200,15 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
def errorAndAbort(msg: String, pos: Position): Nothing

/** Report an error at the position of the macro expansion and throw a StopMacroExpansion */
// TODO: deprecate after 3.1.x
// @deprecated("Use errorAndAbort", "3.2.0")
@deprecated("Use errorAndAbort", "3.1.0")
def throwError(msg: String): Nothing

/** Report an error at the position of `expr` and throw a StopMacroExpansion */
// TODO: deprecate after 3.1.x
// @deprecated("Use errorAndAbort", "3.2.0")
@deprecated("Use errorAndAbort", "3.1.0")
def throwError(msg: String, expr: Expr[Any]): Nothing

/** Report an error message at the given position and throw a StopMacroExpansion */
// TODO: deprecate after 3.1.x
// @deprecated("Use errorAndAbort", "3.2.0")
@deprecated("Use errorAndAbort", "3.1.0")
def throwError(msg: String, pos: Position): Nothing

/** Report a warning at the position of the macro expansion */
Expand Down

0 comments on commit 234dbbf

Please sign in to comment.