File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
tests/neg-custom-args/captures Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 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
13+ | ^
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 | ???
19+ |--------------------------------------------------------------------------------------------------------------------
20+ |Inline stack trace
21+ |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22+ |This location contains code that was inlined from boundary.scala:73
23+ 73 | catch case ex: Break[T] @unchecked =>
24+ | ^
25+ --------------------------------------------------------------------------------------------------------------------
26+ |
27+ | longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1+ import language .experimental .captureChecking
2+
3+ import scala .util .boundary
4+
5+ object test :
6+ boundary[boundary.Label [Unit ]]: l1 ?=> // error
7+ boundary[Unit ]: l2 ?=>
8+ boundary.break(l2)(using l1) // error
9+ ???
You can’t perform that action at this time.
0 commit comments