Skip to content

Commit 2d68072

Browse files
authored
Merge pull request scala#8511 from dotty-staging/remove-last-unnecessary-imports
Remove unnecessary imports part 2
2 parents 8ce959e + dbdce51 commit 2d68072

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

library/src/scala/quoted/QuoteContext.scala

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

library/src/scala/tasty/reflect/ExtractorsPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package scala.tasty
22
package reflect
33

44
class ExtractorsPrinter[R <: Reflection & Singleton](val tasty: R) extends Printer[R] {
5-
import tasty.{_, given _}
5+
import tasty._
66

77
def showTree(tree: Tree)(using ctx: Context): String =
88
new Buffer().visitTree(tree).result()

library/src/scala/tasty/reflect/SourceCodePrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import scala.quoted.show.SyntaxHighlight
66

77
/** Printer for fully elaborated representation of the source code */
88
class SourceCodePrinter[R <: Reflection & Singleton](val tasty: R)(syntaxHighlight: SyntaxHighlight) extends Printer[R] {
9-
import tasty.{_, given _}
9+
import tasty._
1010
import syntaxHighlight._
1111

1212
def showTree(tree: Tree)(using ctx: Context): String =

0 commit comments

Comments
 (0)