We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 426b18c commit fe21298Copy full SHA for fe21298
tests/neg-custom-args/isInstanceOf/i5826b.scala
@@ -0,0 +1,11 @@
1
+class Foo {
2
+ def test1[A]: List[Int] | A => Int = {
3
+ case ls: List[_] => ls.head // error
4
+ case _ => 0
5
+ }
6
+
7
+ def test2[A]: List[Int] | A => Int = {
8
+ case ls: List[_] => ls.size
9
10
11
+}
0 commit comments