Skip to content

Commit 2dd7c32

Browse files
committed
Move showName to scala.internal
1 parent 04625bd commit 2dd7c32

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

library/src/scala/quoted/show/showName.scala renamed to library/src/scala/internal/quoted/showName.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package scala.quoted.show
1+
package scala.internal.quoted
22

33
/** Annotation used inside a quote to give a custom name to a definition.
44
* The `name` argument must be a literal String.

library/src/scala/tasty/reflect/Printers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ trait Printers
16421642

16431643
def printAnnotation(annot: Term)(given elideThis: Option[Symbol]): Buffer = {
16441644
val Annotation(ref, args) = annot
1645-
if (annot.symbol.owner.fullName == "scala.quoted.show.showName") this
1645+
if (annot.symbol.owner.fullName == "scala.internal.quoted.showName") this
16461646
else {
16471647
this += "@"
16481648
printTypeTree(ref)
@@ -1818,7 +1818,7 @@ trait Printers
18181818
}
18191819

18201820
private def splicedName(sym: Symbol)(given ctx: Context): Option[String] = {
1821-
sym.annots.find(_.symbol.owner.fullName == "scala.quoted.show.showName").flatMap {
1821+
sym.annots.find(_.symbol.owner.fullName == "scala.internal.quoted.showName").flatMap {
18221822
case Apply(_, Literal(Constant(c: String)) :: Nil) => Some(c)
18231823
case Apply(_, Inlined(_, _, Literal(Constant(c: String))) :: Nil) => Some(c)
18241824
case annot => None

tests/run-staging/quoted-show-name.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import scala.quoted._
2-
import scala.quoted.show.showName
2+
import scala.internal.quoted.showName
33
import scala.quoted.staging._
44
import scala.reflect.ClassTag
55

0 commit comments

Comments
 (0)