Skip to content

Commit c933560

Browse files
committed
Fix tests
1 parent 3e443b6 commit c933560

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

Diff for: tests/neg/cc-poly-2.check

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
-- [E007] Type Mismatch Error: tests/neg/cc-poly-2.scala:13:15 ---------------------------------------------------------
2-
13 | f[Nothing](d) // error
3-
| ^
4-
| Found: (d : Test.D^)
5-
| Required: Test.D
6-
|
7-
| longer explanation available when compiling with `-explain`
81
-- [E007] Type Mismatch Error: tests/neg/cc-poly-2.scala:14:19 ---------------------------------------------------------
92
14 | f[CapSet^{c1}](d) // error
103
| ^

Diff for: tests/neg/cc-poly-2.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object Test:
1010

1111
def test(c1: C, c2: C) =
1212
val d: D^ = D()
13-
f[Nothing](d) // error
13+
// f[Nothing](d) // already rule out at typer
1414
f[CapSet^{c1}](d) // error
1515
val x = f(d)
1616
val _: D^{c1} = x // error

Diff for: tests/pos/cc-poly-source-capability.scala

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ import caps.unbox
2020

2121
def test1(async1: Async, @unbox others: List[Async]) =
2222
val src = Source[CapSet^{async1, others*}]
23+
val _: Set[Listener^{async1, others*}] = src.allListeners
2324
val lst1 = listener(async1)
2425
val lsts = others.map(listener)
2526
val _: List[Listener^{others*}] = lsts
2627
src.register{lst1}
2728
src.register(listener(async1))
28-
lsts.foreach(src.register)
29-
others.map(listener).foreach(src.register)
29+
lsts.foreach(src.register(_)) // TODO: why we need to use _ explicitly here?
30+
others.map(listener).foreach(src.register(_))
3031
val ls = src.allListeners
3132
val _: Set[Listener^{async1, others*}] = ls
3233

0 commit comments

Comments
 (0)