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.
2 parents f26ff0f + 7309b35 commit c2e1562Copy full SHA for c2e1562
tests/pos-special/fatal-warnings/i8956.scala
@@ -0,0 +1,16 @@
1
+type Numeric = Double | Int
2
+
3
+val v1 = 100
4
+val v2 = 100.0
5
+def check1(i: Double | Int | String): Unit = {
6
+ i match {
7
+ case a:(Double | Int) => println(s"numeric = $a")
8
+ case _ => println("categorical")
9
+ }
10
+}
11
+def check2(i: Double | Int | String): Unit = {
12
13
+ case a:Numeric => println(s"numeric = $a")
14
15
16
0 commit comments