Skip to content

Commit 13a2ea4

Browse files
committed
Update test outputs
1 parent b698ce4 commit 13a2ea4

File tree

7 files changed

+52
-32
lines changed

7 files changed

+52
-32
lines changed

compiler/test/dotty/tools/backend/jvm/LabelBytecodeTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class LabelBytecodeTests extends DottyBytecodeTest {
2121
"""val local = boundary.Label[Long]()
2222
|try break(5L)(using local)
2323
|catch case ex: boundary.Break[Long] @unchecked =>
24-
| if ex.label eq local then ex.value
24+
| if ex.isSameLabelAs(local) then ex.value
2525
| else throw ex
2626
""".stripMargin,
2727
"Long",

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
|
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import language.experimental.captureChecking
2-
31
import scala.util.boundary
42

53
object test:
6-
boundary[boundary.Label[Unit]]: l1 ?=> // error
7-
boundary[Unit]: l2 ?=>
8-
boundary.break(l2)(using l1) // error
9-
???
4+
boundary[AnyRef^]:
5+
l1 ?=> // error // error
6+
boundary[Unit]: l2 ?=>
7+
boundary.break(l2)(using l1)
8+
???

tests/neg-macros/i19842-a.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
|Parents in symbol: [class Object, trait Serializer]
88
|Parents in tree: [trait Serializer]
99
|
10-
| at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
10+
| at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:10)
1111
| at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:210)
1212
| at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:286)
1313
| at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:285)

tests/neg-macros/i19842-b.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
|Parents in symbol: [class Object, trait Serializer]
88
|Parents in tree: [class Object, trait Serializer, trait Foo]
99
|
10-
| at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
10+
| at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:10)
1111
| at dotty.tools.dotc.transform.TreeChecker$.checkParents(TreeChecker.scala:210)
1212
| at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:286)
1313
| at scala.quoted.runtime.impl.QuotesImpl$reflect$ClassDef$.module(QuotesImpl.scala:285)

tests/neg-macros/i23008.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
| at scala.Predef$.require(Predef.scala:337)
88
| at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2540)
99
| at scala.quoted.runtime.impl.QuotesImpl$reflect$StringConstant$.apply(QuotesImpl.scala:2539)
10+
| at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:82)
1011
| at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:80)
11-
| at scala.quoted.ToExpr$StringToExpr.apply(ToExpr.scala:78)
12-
| at scala.quoted.Expr$.apply(Expr.scala:70)
12+
| at scala.quoted.Expr$.apply(Expr.scala:72)
1313
| at Macros$.buildStringCode(Macro_1.scala:9)
1414
|
1515
|---------------------------------------------------------------------------------------------------------------------

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)