-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathuse-capset.check
19 lines (19 loc) · 1.36 KB
/
use-capset.check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- Error: tests/neg-custom-args/captures/use-capset.scala:5:49 ---------------------------------------------------------
5 |private def g[C^] = (xs: List[Object^{C}]) => xs.head // error
| ^^^^^^^
| Capture set parameter C leaks into capture scope of method g.
| To allow this, the type C should be declared with a @use annotation
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/use-capset.scala:11:22 -----------------------------------
11 | val _: () -> Unit = h // error: should be ->{io}
| ^
| Found: (h : () ->{io} Unit)
| Required: () -> Unit
|
| longer explanation available when compiling with `-explain`
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/use-capset.scala:13:50 -----------------------------------
13 | val _: () -> List[Object^{io}] -> Object^{io} = h2 // error, should be ->{io}
| ^^
| Found: (h2 : () ->? (x$0: List[box Object^{io}]^{}) ->{io} Object^{io})
| Required: () -> List[box Object^{io}] -> Object^{io}
|
| longer explanation available when compiling with `-explain`