Skip to content

Commit 6142700

Browse files
committed
Stabilize Quotes abort API
1 parent 86c9a7e commit 6142700

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

library/src/scala/quoted/Quotes.scala

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ 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+
// TODO: deprecate after 3.1.x
58+
// @deprecated("Use valueOrAbort", "3.2.0")
5959
def valueOrError(using FromExpr[T]): T =
6060
val fromExpr = summon[FromExpr[T]]
6161
def reportError =
@@ -69,7 +69,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
6969
* Emits an error and aborts if the expression does not represent a value or possibly contains side effects.
7070
* Otherwise returns the value.
7171
*/
72-
@experimental
7372
def valueOrAbort(using FromExpr[T]): T
7473

7574
end extension
@@ -4193,30 +4192,27 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
41934192
def error(msg: String, pos: Position): Unit
41944193

41954194
/** Report an error at the position of the macro expansion and throw a StopMacroExpansion */
4196-
@experimental
41974195
def errorAndAbort(msg: String): Nothing
41984196

41994197
/** Report an error at the position of `expr` and throw a StopMacroExpansion */
4200-
@experimental
42014198
def errorAndAbort(msg: String, expr: Expr[Any]): Nothing
42024199

42034200
/** Report an error message at the given position and throw a StopMacroExpansion */
4204-
@experimental
42054201
def errorAndAbort(msg: String, pos: Position): Nothing
42064202

42074203
/** Report an error at the position of the macro expansion and throw a StopMacroExpansion */
4208-
// TODO: deprecate in 3.1.0 and remove @experimental from errorAndAbort
4209-
// @deprecated("Use errorAndAbort", "3.1.0")
4204+
// TODO: deprecate after 3.1.x
4205+
// @deprecated("Use errorAndAbort", "3.2.0")
42104206
def throwError(msg: String): Nothing
42114207

42124208
/** Report an error at the position of `expr` and throw a StopMacroExpansion */
4213-
// TODO: deprecate in 3.1.0 and remove @experimental from errorAndAbort
4214-
// @deprecated("Use errorAndAbort", "3.1.0")
4209+
// TODO: deprecate after 3.1.x
4210+
// @deprecated("Use errorAndAbort", "3.2.0")
42154211
def throwError(msg: String, expr: Expr[Any]): Nothing
42164212

42174213
/** Report an error message at the given position and throw a StopMacroExpansion */
4218-
// TODO: deprecate in 3.1.0 and remove @experimental from errorAndAbort
4219-
// @deprecated("Use errorAndAbort", "3.1.0")
4214+
// TODO: deprecate after 3.1.x
4215+
// @deprecated("Use errorAndAbort", "3.2.0")
42204216
def throwError(msg: String, pos: Position): Nothing
42214217

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

0 commit comments

Comments
 (0)