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 {
688
688
class ScalaTermNames extends ScalaNames [TermName ] {
689
689
protected implicit def fromString (s : String ): TermName = termName(s)
690
690
691
- @ switch def syntheticParamName (i : Int ): TermName = i match {
691
+ def syntheticParamName (i : Int ): TermName = ( i : @ switch) match {
692
692
case 0 => x_0
693
693
case 1 => x_1
694
694
case 2 => x_2
@@ -702,7 +702,7 @@ object StdNames {
702
702
case _ => termName(" x$" + i)
703
703
}
704
704
705
- @ switch def productAccessorName (j : Int ): TermName = j match {
705
+ def productAccessorName (j : Int ): TermName = ( j : @ switch) match {
706
706
case 1 => nme._1
707
707
case 2 => nme._2
708
708
case 3 => nme._3
Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
443
443
444
444
def toText (denot : Denotation ): Text = toText(denot.symbol) ~ " /D"
445
445
446
- @ switch private def escapedChar (ch : Char ): String = ch match {
446
+ private def escapedChar (ch : Char ): String = ( ch : @ switch) match {
447
447
case '\b ' => " \\ b"
448
448
case '\t ' => " \\ t"
449
449
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
772
772
def += (x : Char ): this .type = { sb.append(x); this }
773
773
def += (x : String ): this .type = { sb.append(x); this }
774
774
775
- @ switch private def escapedChar (ch : Char ): String = ch match {
775
+ private def escapedChar (ch : Char ): String = ( ch : @ switch) match {
776
776
case '\b ' => " \\ b"
777
777
case '\t ' => " \\ t"
778
778
case '\n ' => " \\ n"
You can’t perform that action at this time.
0 commit comments