Skip to content

Commit bb0514a

Browse files
committed
Stabilize Quotes abort API
1 parent 35eb5a9 commit bb0514a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

library/src/scala/quoted/Quotes.scala

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
5454
* Emits an error and throws if the expression does not represent a value or possibly contains side effects.
5555
* Otherwise returns the value.
5656
*/
57-
// TODO: deprecate in 3.1.0 and remove @experimental from valueOrAbort
58-
// @deprecated("Use valueOrThrow", "3.1.0")
57+
@deprecated("Use valueOrAbort", "3.1.0")
5958
def valueOrError(using FromExpr[T]): T =
6059
val fromExpr = summon[FromExpr[T]]
6160
def reportError =
@@ -69,7 +68,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
6968
* Emits an error and aborts if the expression does not represent a value or possibly contains side effects.
7069
* Otherwise returns the value.
7170
*/
72-
@experimental
7371
def valueOrAbort(using FromExpr[T]): T
7472

7573
end extension
@@ -4179,30 +4177,24 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
41794177
def error(msg: String, pos: Position): Unit
41804178

41814179
/** Report an error at the position of the macro expansion and throw a StopMacroExpansion */
4182-
@experimental
41834180
def errorAndAbort(msg: String): Nothing
41844181

41854182
/** Report an error at the position of `expr` and throw a StopMacroExpansion */
4186-
@experimental
41874183
def errorAndAbort(msg: String, expr: Expr[Any]): Nothing
41884184

41894185
/** Report an error message at the given position and throw a StopMacroExpansion */
4190-
@experimental
41914186
def errorAndAbort(msg: String, pos: Position): Nothing
41924187

41934188
/** Report an error at the position of the macro expansion and throw a StopMacroExpansion */
4194-
// TODO: deprecate in 3.1.0 and remove @experimental from errorAndAbort
4195-
// @deprecated("Use errorAndAbort", "3.1.0")
4189+
@deprecated("Use errorAndAbort", "3.1.0")
41964190
def throwError(msg: String): Nothing
41974191

41984192
/** Report an error at the position of `expr` and throw a StopMacroExpansion */
4199-
// TODO: deprecate in 3.1.0 and remove @experimental from errorAndAbort
4200-
// @deprecated("Use errorAndAbort", "3.1.0")
4193+
@deprecated("Use errorAndAbort", "3.1.0")
42014194
def throwError(msg: String, expr: Expr[Any]): Nothing
42024195

42034196
/** Report an error message at the given position and throw a StopMacroExpansion */
4204-
// TODO: deprecate in 3.1.0 and remove @experimental from errorAndAbort
4205-
// @deprecated("Use errorAndAbort", "3.1.0")
4197+
@deprecated("Use errorAndAbort", "3.1.0")
42064198
def throwError(msg: String, pos: Position): Nothing
42074199

42084200
/** Report a warning at the position of the macro expansion */

0 commit comments

Comments
 (0)