@@ -30,16 +30,12 @@ class QuoteContext(val tasty: scala.tasty.Reflection) { self =>
3030 }
3131
3232 /** Report an error at the position of the macro expansion */
33- def error (msg : => String ): Unit = {
34- import tasty .{_ , given _ }
35- tasty.error(msg, rootPosition)
36- }
33+ def error (msg : => String ): Unit =
34+ tasty.error(msg, tasty.rootPosition)
3735
3836 /** Report an error at the on the position of `expr` */
39- def error (msg : => String , expr : Expr [Any ]): Unit = {
40- import tasty .{_ , given _ }
37+ def error (msg : => String , expr : Expr [Any ]): Unit =
4138 tasty.error(msg, expr.unseal(using this ).pos)
42- }
4339
4440 /** Report an error at the position of the macro expansion and throws a StopQuotedContext */
4541 def throwError (msg : => String ): Nothing = {
@@ -53,15 +49,11 @@ class QuoteContext(val tasty: scala.tasty.Reflection) { self =>
5349 }
5450
5551 /** Report a warning */
56- def warning (msg : => String ): Unit = {
57- import tasty .{_ , given _ }
58- tasty.warning(msg, rootPosition)
59- }
52+ def warning (msg : => String ): Unit =
53+ tasty.warning(msg, tasty.rootPosition)
6054
6155 /** Report a warning at the on the position of `expr` */
62- def warning (msg : => String , expr : Expr [_]): Unit = {
63- import tasty .{_ , given _ }
56+ def warning (msg : => String , expr : Expr [_]): Unit =
6457 tasty.warning(msg, expr.unseal(using this ).pos)
65- }
6658
6759}
0 commit comments