Skip to content

Commit 4b8db82

Browse files
committed
Fix check files on rebase
1 parent 633272f commit 4b8db82

File tree

3 files changed

+62
-49
lines changed

3 files changed

+62
-49
lines changed

tests/neg-custom-args/captures/reaches.check

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
|where: => refers to a fresh root capability created in method runAll0 when checking argument to parameter f of method usingFile
1010
| ^ refers to the universal root capability
1111
| cap is a fresh root capability created in anonymous function of type (f: File^'s1): Unit of parameter parameter f² of method $anonfun
12-
23 | cur = (() => f.write()) :: Nil
12+
21 | cur = (() => f.write()) :: Nil
1313
|
1414
| longer explanation available when compiling with `-explain`
1515
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:30:13 --------------------------------------
@@ -23,8 +23,8 @@
2323
|where: => refers to a fresh root capability created in method runAll1 when checking argument to parameter f of method usingFile
2424
| ^ refers to the universal root capability
2525
| cap is a fresh root capability created in anonymous function of type (f: File^'s3): Unit of parameter parameter f² of method $anonfun
26-
33 | cur.set:
27-
34 | (() => f.write()) :: Nil
26+
31 | cur.set:
27+
32 | (() => f.write()) :: Nil
2828
|
2929
| longer explanation available when compiling with `-explain`
3030
-- Error: tests/neg-custom-args/captures/reaches.scala:42:16 -----------------------------------------------------------
@@ -98,8 +98,8 @@
9898
|where: => refers to a fresh root capability created in value leaked when checking argument to parameter f of method usingFile
9999
| ^ refers to the universal root capability
100100
| cap is a fresh root capability created in anonymous function of type (f: File^'s6): File^{id*} of parameter parameter f² of method $anonfun
101-
70 | val f1: File^{id*} = id(f)
102-
71 | f1
101+
68 | val f1: File^{id*} = id(f)
102+
69 | f1
103103
|
104104
| longer explanation available when compiling with `-explain`
105105
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reaches.scala:85:10 --------------------------------------

tests/neg-custom-args/captures/reference-cc.check

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
|Found: (file: java.io.FileOutputStream^'s1) ->'s2 () ->{file} Unit
1010
|Required: java.io.FileOutputStream^ => () ->'s3 Unit
1111
|
12+
|Note that capability file cannot be included in outer capture set 's3.
13+
|
1214
|where: => refers to a fresh root capability created in value later when checking argument to parameter op of method usingLogFile
1315
| ^ refers to the universal root capability
1416
|
15-
|Note that capability file cannot be included in outer capture set 's3.
16-
|
1717
| longer explanation available when compiling with `-explain`
1818
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/reference-cc.scala:47:25 ---------------------------------
1919
47 | val xs = usingLogFile: f => // error
2020
| ^
2121
|Found: (f: java.io.FileOutputStream^'s4) ->'s5 LzyList[Int]^{f}
2222
|Required: java.io.FileOutputStream^ => LzyList[Int]^'s6
2323
|
24+
|Note that capability f cannot be included in outer capture set 's6.
25+
|
2426
|where: => refers to a fresh root capability created in value xs when checking argument to parameter op of method usingLogFile
2527
| ^ refers to the universal root capability
26-
|
27-
|Note that capability f cannot be included in outer capture set 's6.
2828
48 | LzyList(1, 2, 3).map { x => f.write(x); x * x }
2929
|
3030
| longer explanation available when compiling with `-explain`
@@ -34,10 +34,12 @@
3434
|Found: () => Double
3535
|Required: () =>² Double
3636
|
37-
|where: => refers to a fresh root capability classified as Control in the type of given instance canThrow$1
38-
| =>² refers to a fresh root capability created in anonymous function of type (using erased x$1: CanThrow[LimitExceeded]): () => Double when instantiating expected result type () ->{cap} Double of function literal
37+
|Note that capability cap is not included in capture set {cap²}
38+
|because cap in method try$1 is not visible from cap² in enclosing function.
3939
|
40-
|Note that capability cap is not included in capture set {cap}
41-
|because cap in method try$1 is not visible from cap in enclosing function.
40+
|where: => refers to a fresh root capability classified as Control in the type of given instance canThrow$1
41+
| =>² refers to a fresh root capability created in anonymous function of type (using erased x$1: CanThrow[LimitExceeded]): () => Double when instantiating expected result type () ->{cap³} Double of function literal
42+
| cap is a fresh root capability classified as Control in the type of given instance canThrow$1
43+
| cap² is a fresh root capability created in anonymous function of type (using erased x$1: CanThrow[LimitExceeded]): () => Double when instantiating expected result type () ->{cap³} Double of function literal
4244
|
4345
| longer explanation available when compiling with `-explain`
Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,68 @@
11
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps2.scala:5:23 ----------------------------------
22
5 | val _: (x: C) => C = b // error
33
| ^
4-
| Found: (b : C => C)
5-
| Required: (x: C^) =>² C^²
4+
| Found: (b : C => C)
5+
| Required: (x: C^) =>² C^²
66
|
7-
| where: => refers to a fresh root capability in the type of value b
8-
| =>² refers to a fresh root capability in the type of value _$1
9-
| ^ refers to the universal root capability
10-
| ^² refers to a root capability associated with the result type of (x: C^): C^²
7+
| Note that the existential capture root in C^
8+
| cannot subsume the capability cap..
119
|
12-
| Note that the existential capture root in C^
13-
| cannot subsume the capability cap..
10+
| Note that capability cap is not included in capture set {cap²}.
11+
|
12+
| where: => refers to a fresh root capability in the type of value b
13+
| =>² refers to a fresh root capability in the type of value _$1
14+
| ^ refers to the universal root capability
15+
| ^² refers to a root capability associated with the result type of (x: C^): C^²
16+
| cap is a fresh root capability classified as SharedCapability in the type of value b
17+
| cap² is a fresh root capability in the type of value b
1418
|
1519
| longer explanation available when compiling with `-explain`
1620
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps2.scala:6:18 ----------------------------------
1721
6 | val _: C => C = a // error
1822
| ^
19-
| Found: (a : (x: C) => C)
20-
| Required: C^ =>² C^²
23+
| Found: (a : (x: C) => C)
24+
| Required: C^ =>² C^²
2125
|
22-
| where: => refers to a fresh root capability in the type of value a
23-
| =>² refers to a fresh root capability in the type of value _$2
24-
| ^ refers to the universal root capability
25-
| ^² refers to a fresh root capability classified as SharedCapability in the type of value _$2
26+
| Note that capability cap is not included in capture set {cap²}.
2627
|
27-
| Note that capability cap is not included in capture set {cap}.
28+
| where: => refers to a fresh root capability in the type of value a
29+
| =>² refers to a fresh root capability in the type of value _$2
30+
| ^ refers to the universal root capability
31+
| ^² refers to a fresh root capability classified as SharedCapability in the type of value _$2
32+
| cap is a fresh root capability in the type of value a
33+
| cap² is a fresh root capability in the type of value _$2
2834
|
2935
| longer explanation available when compiling with `-explain`
3036
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps2.scala:8:18 ----------------------------------
3137
8 | val _: C => C = (x: C) => a(x) // error
3238
| ^^^^^^^^^^^^^^
33-
| Found: (x: C^) ->{a} C^²
34-
| Required: C^ => C^³
39+
| Found: (x: C^) ->{a} C^²
40+
| Required: C^ => C^³
3541
|
36-
| where: => refers to a fresh root capability in the type of value _$4
37-
| ^ refers to the universal root capability
38-
| ^² refers to a root capability associated with the result type of (x: C^): C^²
39-
| ^³ refers to a fresh root capability classified as SharedCapability in the type of value _$4
42+
| Note that capability cap is not included in capture set {cap²}
43+
| because cap is not visible from cap² in value _$4.
4044
|
41-
| Note that capability <cap of (x: C^): C^> is not included in capture set {cap}
42-
| because <cap of (x: C^): C^> is not visible from cap in value _$4.
45+
| where: => refers to a fresh root capability in the type of value _$4
46+
| ^ refers to the universal root capability
47+
| ^² refers to a root capability associated with the result type of (x: C^): C^²
48+
| ^³ refers to a fresh root capability classified as SharedCapability in the type of value _$4
49+
| cap is a root capability associated with the result type of (x: C^): C^²
50+
| cap² is a fresh root capability classified as SharedCapability in the type of value _$4
4351
|
4452
| longer explanation available when compiling with `-explain`
4553
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps2.scala:14:18 ---------------------------------
4654
14 | val _: C -> C = a // error
4755
| ^
48-
| Found: (a : (x: C) -> C)
49-
| Required: C^ -> C^²
56+
| Found: (a : (x: C) -> C)
57+
| Required: C^ -> C^²
5058
|
51-
| where: ^ refers to the universal root capability
52-
| ^² refers to a fresh root capability classified as SharedCapability in the type of value _$6
59+
| Note that capability cap is not included in capture set {cap²}
60+
| because cap is not visible from cap² in value _$6.
5361
|
54-
| Note that capability <cap of (x: C^): C^> is not included in capture set {cap}
55-
| because <cap of (x: C^): C^> is not visible from cap in value _$6.
62+
| where: ^ refers to the universal root capability
63+
| ^² refers to a fresh root capability classified as SharedCapability in the type of value _$6
64+
| cap is a root capability associated with the result type of (x: C^): C^³
65+
| cap² is a fresh root capability classified as SharedCapability in the type of value _$6
5666
|
5767
| longer explanation available when compiling with `-explain`
5868
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps2.scala:15:23 ---------------------------------
@@ -61,22 +71,23 @@
6171
| Found: (x: C^) ->{b} C^²
6272
| Required: (x: C^) -> C^³
6373
|
74+
| Note that capability b is not included in capture set {}.
75+
|
6476
| where: ^ refers to the universal root capability
6577
| ^² refers to a root capability associated with the result type of (x: C^): C^²
6678
| ^³ refers to a root capability associated with the result type of (x: C^): C^³
6779
|
68-
| Note that capability b is not included in capture set {}.
69-
|
7080
| longer explanation available when compiling with `-explain`
7181
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps2.scala:16:29 ---------------------------------
7282
16 | val _: C -> C = (x: C) => a(x) // error
7383
| ^^^^
74-
| Found: C^{x}
75-
| Required: C^
84+
| Found: C^{x}
85+
| Required: C^
7686
|
77-
| where: ^ refers to a fresh root capability classified as SharedCapability in the type of value _$8
87+
| Note that capability x is not included in capture set {cap}
88+
| because (x : C) in enclosing function is not visible from cap in value _$8.
7889
|
79-
| Note that capability x is not included in capture set {cap}
80-
| because (x : C) in enclosing function is not visible from cap in value _$8.
90+
| where: ^ refers to a fresh root capability classified as SharedCapability in the type of value _$8
91+
| cap is a fresh root capability classified as SharedCapability in the type of value _$8
8192
|
8293
| longer explanation available when compiling with `-explain`

0 commit comments

Comments
 (0)