File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ object typers {
7777
7878 class C {
7979
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 {
8181 case 0 => acc
8282 case _ => factorial(acc * n, n - 1 )
8383 }
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ object Test extends App {
1818 case _ => 4
1919 }
2020
21- val x3 = ( x : @ switch) match {
21+ val x3 = x match {
2222 case '0' if x > 0 => 0
2323 case '1' => 1
2424 case '2' => 2
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ object Test extends dotty.runtime.LegacyApp {
1010 case 'c' =>
1111 }
1212
13- def ifThenElse (ch : Char , eof : Boolean ) = ( ch : @ switch) match {
13+ def ifThenElse (ch : Char , eof : Boolean ) = ch match {
1414 case 'a' if eof => println(" a with oef" ) // then branch
1515 case 'a' if eof => println(" a with oef2" ) // unreachable, but the analysis is not that sophisticated
1616 case 'a' => println(" a" ) // else-branch
@@ -22,7 +22,7 @@ object Test extends dotty.runtime.LegacyApp {
2222 case _ => println(" default" )
2323 }
2424
25- def defaults (ch : Char , eof : Boolean ) = ( ch : @ switch) match {
25+ def defaults (ch : Char , eof : Boolean ) = ch match {
2626 case _ if eof => println(" def with oef" ) // then branch
2727 case _ if eof => println(" def with oef2" ) // unreachable, but the analysis is not that sophisticated
2828 case _ => println(" def" ) // else-branch
You can’t perform that action at this time.
0 commit comments