File tree 3 files changed +4
-4
lines changed 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ object typers {
77
77
78
78
class C {
79
79
80
- @ tailrec final def factorial (acc : Int , n : Int ): Int = ( n : @ switch) match {
80
+ @ tailrec final def factorial (acc : Int , n : Int ): Int = n match {
81
81
case 0 => acc
82
82
case _ => factorial(acc * n, n - 1 )
83
83
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ object Test extends App {
18
18
case _ => 4
19
19
}
20
20
21
- val x3 = ( x : @ switch) match {
21
+ val x3 = x match {
22
22
case '0' if x > 0 => 0
23
23
case '1' => 1
24
24
case '2' => 2
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ object Test extends dotty.runtime.LegacyApp {
10
10
case 'c' =>
11
11
}
12
12
13
- def ifThenElse (ch : Char , eof : Boolean ) = ( ch : @ switch) match {
13
+ def ifThenElse (ch : Char , eof : Boolean ) = ch match {
14
14
case 'a' if eof => println(" a with oef" ) // then branch
15
15
case 'a' if eof => println(" a with oef2" ) // unreachable, but the analysis is not that sophisticated
16
16
case 'a' => println(" a" ) // else-branch
@@ -22,7 +22,7 @@ object Test extends dotty.runtime.LegacyApp {
22
22
case _ => println(" default" )
23
23
}
24
24
25
- def defaults (ch : Char , eof : Boolean ) = ( ch : @ switch) match {
25
+ def defaults (ch : Char , eof : Boolean ) = ch match {
26
26
case _ if eof => println(" def with oef" ) // then branch
27
27
case _ if eof => println(" def with oef2" ) // unreachable, but the analysis is not that sophisticated
28
28
case _ => println(" def" ) // else-branch
You can’t perform that action at this time.
0 commit comments