Skip to content

Commit 651b674

Browse files
committed
Fix tests
1 parent 3e443b6 commit 651b674

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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) // error: 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(_))
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)