File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc
library/src/scala/tasty/util Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ object StdNames {
688688 class ScalaTermNames extends ScalaNames [TermName ] {
689689 protected implicit def fromString (s : String ): TermName = termName(s)
690690
691- @ switch def syntheticParamName (i : Int ): TermName = i match {
691+ def syntheticParamName (i : Int ): TermName = ( i : @ switch) match {
692692 case 0 => x_0
693693 case 1 => x_1
694694 case 2 => x_2
@@ -702,7 +702,7 @@ object StdNames {
702702 case _ => termName(" x$" + i)
703703 }
704704
705- @ switch def productAccessorName (j : Int ): TermName = j match {
705+ def productAccessorName (j : Int ): TermName = ( j : @ switch) match {
706706 case 1 => nme._1
707707 case 2 => nme._2
708708 case 3 => nme._3
Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
443443
444444 def toText (denot : Denotation ): Text = toText(denot.symbol) ~ " /D"
445445
446- @ switch private def escapedChar (ch : Char ): String = ch match {
446+ private def escapedChar (ch : Char ): String = ( ch : @ switch) match {
447447 case '\b ' => " \\ b"
448448 case '\t ' => " \\ t"
449449 case '\n ' => " \\ n"
Original file line number Diff line number Diff line change @@ -772,7 +772,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
772772 def += (x : Char ): this .type = { sb.append(x); this }
773773 def += (x : String ): this .type = { sb.append(x); this }
774774
775- @ switch private def escapedChar (ch : Char ): String = ch match {
775+ private def escapedChar (ch : Char ): String = ( ch : @ switch) match {
776776 case '\b ' => " \\ b"
777777 case '\t ' => " \\ t"
778778 case '\n ' => " \\ n"
You can’t perform that action at this time.
0 commit comments