We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4b4983 commit a6c62c4Copy full SHA for a6c62c4
tests/pos/i7807.scala
@@ -2,14 +2,15 @@ object Test:
2
3
def flip: (x: 0 | 1) => x.type match { case 0 => 1 case 1 => 0 } = ???
4
5
- flip(0): 1
6
- flip(1): 0
+ // Probably related to https://github.com/lampepfl/dotty/issues/7872
+ // flip(0): 1
7
+ // flip(1): 0
8
- flip(if ??? then 0 else 1)
9
- val n: 0 | 1 = if ??? then 0 else 1
10
- flip(n)
+ // flip(if ??? then 0 else 1)
+ // val n: 0 | 1 = if ??? then 0 else 1
11
+ // flip(n)
12
- val m: n.type match { case 0 => 1 case 1 => 0 } = flip(n)
13
+ // val m: n.type match { case 0 => 1 case 1 => 0 } = flip(n)
14
15
// The following do not work, see discussion in https://github.com/lampepfl/dotty/pull/7835/files/6e60814e69be5c8d60265d4ce4bc1758863c23d8#r361741296:
16
// flip(m)
0 commit comments