-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle reach capabilities correctly in depedent functions (#20203)
Handle reach capabilities correctly when computing whether a function is dependent.
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
object Test: | ||
class C | ||
type Proc = () => Unit | ||
|
||
def f(c: C^, d: C^): () ->{c, d} Unit = | ||
def foo(xs: Proc*): () ->{xs*} Unit = | ||
xs.head | ||
val a: () ->{c} Unit = () => () | ||
val b: () ->{d} Unit = () => () | ||
val xx = foo(a, b) | ||
xx | ||
|
||
def g(c: C^, d: C^): () ->{c, d} Unit = | ||
|
||
def foo(xs: Seq[() => Unit]): () ->{xs*} Unit = | ||
xs.head | ||
|
||
val a: () ->{c} Unit = () => () | ||
val b: () ->{d} Unit = () => () | ||
val xx = foo(Seq(a, b)) | ||
xx |