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 97dcf78 commit fcc753bCopy full SHA for fcc753b
tests/neg/mt-scrutinee-widen.scala
@@ -0,0 +1,24 @@
1
+// We widen scrutinee's that are inline proxies
2
+// But make sure that term refs in scrutinees are not widened in general
3
+
4
+val x: Int = 42
5
+val y: Int = 43
6
+val z: Int = 44
7
8
+type IsX[T] =
9
+ T match
10
+ case x.type => true
11
+ case _ => false
12
+def test = summon[IsX[y.type] =:= IsX[z.type]] // error
13
14
+def test2 = summon[
15
+ (
16
+ y.type match
17
18
19
+ ) =:= (
20
+ z.type match
21
22
23
+ )
24
+] // error
0 commit comments