Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57b09a3

Browse files
committed
Update cc-fresh-levels.scala
It was unsound, but fixed now on main.
1 parent 43b1626 commit 57b09a3

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

‎tests/neg-custom-args/captures/cc-fresh-levels.check‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,14 @@ Flag -source set repeatedly
1717
| where: ^ refers to a fresh root capability in the type of value r
1818
|
1919
| longer explanation available when compiling with `-explain`
20+
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/cc-fresh-levels.scala:18:9 -------------------------------
21+
18 | runIO: innerIO => // error
22+
| ^
23+
|Found: (innerIO: IO^?) ->? Unit
24+
|Required: IO^ => Unit
25+
|
26+
|where: => refers to a fresh root capability created in method test1 when checking argument to parameter op of method runIO
27+
| ^ refers to the universal root capability
28+
19 | r.put(innerIO)
29+
|
30+
| longer explanation available when compiling with `-explain`

‎tests/neg-custom-args/captures/cc-fresh-levels.scala‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ def test1(a: IO^, b: IO^, c: IO^): Unit =
1515
r.put(c) // ok
1616
runIO: (innerIO: IO^) =>
1717
r.put(innerIO) // error
18-
runIO: innerIO =>
19-
r.put(innerIO)// should be error, but ok // unsound
18+
runIO: innerIO =>// error
19+
r.put(innerIO)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /