Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noti0na1 committed Nov 22, 2024
1 parent 3e443b6 commit 651b674
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/neg/cc-poly-2.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object Test:

def test(c1: C, c2: C) =
val d: D^ = D()
f[Nothing](d) // error
// f[Nothing](d) // error: already rule out at typer
f[CapSet^{c1}](d) // error
val x = f(d)
val _: D^{c1} = x // error
5 changes: 3 additions & 2 deletions tests/pos/cc-poly-source-capability.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ import caps.unbox

def test1(async1: Async, @unbox others: List[Async]) =
val src = Source[CapSet^{async1, others*}]
val _: Set[Listener^{async1, others*}] = src.allListeners
val lst1 = listener(async1)
val lsts = others.map(listener)
val _: List[Listener^{others*}] = lsts
src.register{lst1}
src.register(listener(async1))
lsts.foreach(src.register)
others.map(listener).foreach(src.register)
lsts.foreach(src.register(_))
others.map(listener).foreach(src.register(_))
val ls = src.allListeners
val _: Set[Listener^{async1, others*}] = ls

Expand Down

0 comments on commit 651b674

Please sign in to comment.