@@ -34,31 +34,10 @@ trait QuoteContext { self =>
3434 val tasty : self.tasty.type
3535 }
3636
37- /** Report an error at the position of the macro expansion */
38- def error (msg : => String ): Unit =
39- tasty.error(msg, tasty.rootPosition)
40-
41- /** Report an error at the on the position of `expr` */
42- def error (msg : => String , expr : Expr [Any ]): Unit =
43- tasty.error(msg, expr.unseal(using this ).pos)
44-
45- /** Report an error at the position of the macro expansion and throws a StopQuotedContext */
46- def throwError (msg : => String ): Nothing = {
47- error(msg)
48- throw new StopQuotedContext
49- }
50- /** Report an error at the on the position of `expr` and throws a StopQuotedContext */
51- def throwError (msg : => String , expr : Expr [Any ]): Nothing = {
52- error(msg, expr)
53- throw new StopQuotedContext
54- }
55-
56- /** Report a warning */
57- def warning (msg : => String ): Unit =
58- tasty.warning(msg, tasty.rootPosition)
59-
60- /** Report a warning at the on the position of `expr` */
61- def warning (msg : => String , expr : Expr [Any ]): Unit =
62- tasty.warning(msg, expr.unseal(using this ).pos)
37+ }
6338
39+ object QuoteContext {
40+ // TODO remove in 0.26.0
41+ @ deprecated(" Errors and warnings have been moved to scala.quoted.Reporting" , " 0.25.0" )
42+ given error_and_warining_on_QuoteContext as Conversion [QuoteContext , Reporting .type ] = _ => Reporting
6443}
0 commit comments