Skip to content

Commit 86e72db

Browse files
committed
Fix neg test
1 parent 7071cd9 commit 86e72db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/neg/i2378.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ class Test(val tb: Toolbox) {
2020
import tb._
2121
implicit val cap: Cap = null
2222

23-
def foo(tree: Tree): Int = tree match { // error: private escape
24-
case tb.Apply(fun, args) => 3 // error
23+
def foo(tree: Tree): Int = (tree: Any) match {
24+
case tb.Apply(fun, args) => 3 // error, but error message is wrong
2525
}
2626

27-
def bar(tree: tpd.Tree): Int = tree match { // error: private escape
28-
case Apply(fun, args) => 3 // error
27+
def bar(tree: tpd.Tree): Int = (tree: Any) match {
28+
case Apply(fun, args) => 3 // error, but error message is wrong
2929
}
3030
}

0 commit comments

Comments
 (0)