File tree Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Expand file tree Collapse file tree 5 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 1
- // This file is part of tests for inferring GADT constraints from type members,
2
- // which needed to be reverted because of soundness issues.
3
- //
4
- // Lines with "// limitation" are the ones that we could soundly allow.
1
+ // This file is part of tests for inferring GADT constraints from type members.
2
+ // They are now supported by path-dependent GADT reasoning. See #14754.
5
3
object Test {
6
4
7
5
trait Expr { type T }
@@ -11,19 +9,19 @@ object Test {
11
9
def foo [A ](e : Expr { type T = A }) = e match {
12
10
case _ : IntLit =>
13
11
val a : A = 0 // error
14
- val i : Int = ??? : A // limitation // error
12
+ val i : Int = ??? : A
15
13
16
14
case _ : Expr { type T <: Int } =>
17
15
val a : A = 0 // error
18
- val i : Int = ??? : A // limitation // error
16
+ val i : Int = ??? : A
19
17
20
18
case _ : IntExpr =>
21
19
val a : A = 0
22
- val i : Int = ??? : A // limitation // error
20
+ val i : Int = ??? : A
23
21
24
22
case _ : Expr { type T = Int } =>
25
23
val a : A = 0
26
- val i : Int = ??? : A // limitation // error
24
+ val i : Int = ??? : A
27
25
}
28
26
29
27
def bar [A ](e : Expr { type T <: A }) = e match {
Original file line number Diff line number Diff line change 1
- // This file is part of tests for inferring GADT constraints from type members,
2
- // which needed to be reverted because of soundness issues .
1
+ // This file is part of tests for inferring GADT constraints from type members.
2
+ // They are now supported by path-dependent GADT reasoning. See #14754 .
3
3
//
4
4
// Lines with "// limitation" are the ones that we could soundly allow.
5
5
object Test {
Original file line number Diff line number Diff line change 1
- // This file is part of tests for inferring GADT constraints from type members,
2
- // which needed to be reverted because of soundness issues .
1
+ // This file is part of tests for inferring GADT constraints from type members.
2
+ // They are now supported by path-dependent GADT reasoning. See #14754 .
3
3
//
4
4
// Lines with "// limitation" are the ones that we could soundly allow.
5
5
object Test {
Original file line number Diff line number Diff line change 1
- // This file is part of tests for inferring GADT constraints from type members,
2
- // which needed to be reverted because of soundness issues.
3
- //
4
- // Lines with "// limitation" are the ones that we could soundly allow.
1
+ // This file is part of tests for inferring GADT constraints from type members.
2
+ // They are now supported by path-dependent GADT reasoning. See #14754.
5
3
object Test {
6
4
7
5
trait Expr { type T }
@@ -28,23 +26,23 @@ object Test {
28
26
def foo [A ](e : ExprExact [A ]) = e match {
29
27
case _ : IndirectIntLit =>
30
28
val a : A = 0 // error
31
- val i : Int = ??? : A // limitation // error
29
+ val i : Int = ??? : A
32
30
33
31
case _ : IndirectExprSub [Int ] =>
34
32
val a : A = 0 // error
35
- val i : Int = ??? : A // limitation // error
33
+ val i : Int = ??? : A
36
34
37
35
case _ : IndirectExprSub2 [Int ] =>
38
36
val a : A = 0 // error
39
- val i : Int = ??? : A // limitation // error
37
+ val i : Int = ??? : A
40
38
41
39
case _ : IndirectIntExpr =>
42
40
val a : A = 0
43
41
val i : Int = ??? : A
44
42
45
43
case _ : IndirectExprExact [Int ] =>
46
44
val a : A = 0
47
- val i : Int = ??? : A // limitation // error
45
+ val i : Int = ??? : A
48
46
}
49
47
50
48
def bar [A ](e : ExprSub [A ]) = e match {
Original file line number Diff line number Diff line change 1
- // This file is part of tests for inferring GADT constraints from type members,
2
- // which needed to be reverted because of soundness issues .
1
+ // This file is part of tests for inferring GADT constraints from type members.
2
+ // They are now supported by path-dependent GADT reasoning. See #14754 .
3
3
//
4
4
// Lines with "// limitation" are the ones that we could soundly allow.
5
5
object Test {
You can’t perform that action at this time.
0 commit comments