Skip to content

Commit b9fcd2a

Browse files
committed
Update test outputs
1 parent 42b2792 commit b9fcd2a

File tree

3 files changed

+44
-23
lines changed

3 files changed

+44
-23
lines changed

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

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,47 @@
1-
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:8:31 --------------------------------------
2-
8 | boundary.break(l2)(using l1) // error
3-
| ^^
4-
| Found: (local : scala.util.boundary.Label[scala.util.boundary.Label[Unit]]^)
5-
| Required: scala.util.boundary.Label[box scala.util.boundary.Label[Unit]^{local²}]^
6-
|
7-
| where: local is a value locally defined in object test
8-
| local² is a value locally defined in object test
9-
|
10-
| longer explanation available when compiling with `-explain`
11-
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:6:32 --------------------------------------
12-
6 | boundary[boundary.Label[Unit]]: l1 ?=> // error
1+
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:5:4 ---------------------------------------
2+
4 | boundary[AnyRef^]:
3+
5 | l1 ?=> // error // error
134
| ^
14-
| Found: scala.util.boundary.Break[scala.util.boundary.Label[Unit]] @unchecked
15-
| Required: scala.util.boundary.Break[box scala.util.boundary.Label[Unit]^] @unchecked
16-
7 | boundary[Unit]: l2 ?=>
17-
8 | boundary.break(l2)(using l1) // error
18-
9 | ???
5+
|Found: scala.util.boundary.Label[Object^?]^{cap.rd}
6+
|Required: scala.util.boundary.Label[Object^]^²
7+
|
8+
|where: ^ refers to the universal root capability
9+
| ^² refers to a fresh root capability classified as Control in the type of value local
10+
| cap is a fresh root capability classified as Control created in value local when constructing Capability instance scala.util.boundary.Label[Object^?]
11+
|
12+
|Note that capability cap
13+
|cannot be included in outer capture set ?.
14+
6 | boundary[Unit]: l2 ?=>
15+
7 | boundary.break(l2)(using l1)
16+
8 | ???
17+
|--------------------------------------------------------------------------------------------------------------------
18+
|Inline stack trace
19+
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20+
|This location contains code that was inlined from boundary.scala:70
21+
70 | val local = Label[T]()
22+
| ^^^^^^^^^^
23+
--------------------------------------------------------------------------------------------------------------------
24+
|
25+
| longer explanation available when compiling with `-explain`
26+
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/boundary.scala:5:4 ---------------------------------------
27+
4 | boundary[AnyRef^]:
28+
5 | l1 ?=> // error // error
29+
| ^
30+
| Found: scala.util.boundary.Break[AnyRef^] @unchecked
31+
| Required: scala.util.boundary.Break[Object^²] @unchecked
32+
|
33+
| where: ^ refers to the universal root capability
34+
| ^² refers to a fresh root capability created in package <empty>
35+
|
36+
| Note that capability cap is not included in capture set {cap}.
37+
6 | boundary[Unit]: l2 ?=>
38+
7 | boundary.break(l2)(using l1)
39+
8 | ???
1940
|--------------------------------------------------------------------------------------------------------------------
2041
|Inline stack trace
2142
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22-
|This location contains code that was inlined from boundary.scala:73
23-
73 | catch case ex: Break[T] @unchecked =>
43+
|This location contains code that was inlined from boundary.scala:72
44+
72 | catch case ex: Break[T] @unchecked =>
2445
| ^
2546
--------------------------------------------------------------------------------------------------------------------
2647
|

tests/neg-custom-args/captures/boundary.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import scala.util.boundary
22

33
object test:
44
boundary[AnyRef^]:
5-
l1 ?=> // error
5+
l1 ?=> // error // error
66
boundary[Unit]: l2 ?=>
7-
boundary.break(l2)(using l1) // error
7+
boundary.break(l2)(using l1)
88
???

tests/run/assert-stack.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
1+
scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:10)
22
Test$.main(assert-stack.scala:7)
33

4-
scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
4+
scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:13)
55
Test$.main(assert-stack.scala:12)
66

0 commit comments

Comments
 (0)