File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1- //> using options -Werror
2-
31def boundary [T ](body : (T => RuntimeException ) => T ): T =
42 case class Break (value : T ) extends RuntimeException
53 try body(Break .apply)
6- catch case Break (t) => t // error : pattern matching on local classes is unsound currently
4+ catch case Break (t) => t // warn : pattern matching on local classes is unsound currently
75
86def test =
97 boundary[Int ]: EInt =>
@@ -16,4 +14,4 @@ def boundaryCorrectBehaviour[T](body: (T => RuntimeException) => T): T =
1614 // A correct implementation, but is still treated as a local class right now
1715 case class Break (value : T ) extends RuntimeException
1816 try body(local.Break .apply)
19- catch case local.Break (t) => t // error
17+ catch case local.Break (t) => t // warn
You can’t perform that action at this time.
0 commit comments