-
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.
Switch version where separation checking starts to 3.8
3.7 is already on us, so bump by one. Two new tests for separation checking. One i15749a required a change in SepCheck: We need to be able to declare reach capabilities in dependencies. The reach is imply dropped. But we can't sometimes use a normal capability since its capture set might be empty.
- Loading branch information
Showing
17 changed files
with
44 additions
and
26 deletions.
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
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import language.`3.7` // sepchecks on | ||
import language.`3.8` // sepchecks on | ||
class CC | ||
type Cap = CC^ | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import language.`3.7` // sepchecks on | ||
import language.`3.8` // sepchecks on | ||
class CC | ||
type Cap = CC^ | ||
|
||
|
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 |
---|---|---|
@@ -1,10 +1,25 @@ | ||
-- Error: tests/neg-custom-args/captures/reaches2.scala:8:10 ----------------------------------------------------------- | ||
8 | ps.map((x, y) => compose1(x, y)) // error // error | ||
| ^ | ||
|reference ps* is not included in the allowed capture set {} | ||
|of an enclosing function literal with expected type ((box A ->{ps*} A, box A ->{ps*} A)) -> box (x$0: A^?) ->? A^? | ||
-- Error: tests/neg-custom-args/captures/reaches2.scala:8:13 ----------------------------------------------------------- | ||
8 | ps.map((x, y) => compose1(x, y)) // error // error | ||
| ^ | ||
|reference ps* is not included in the allowed capture set {} | ||
|of an enclosing function literal with expected type ((box A ->{ps*} A, box A ->{ps*} A)) -> box (x$0: A^?) ->? A^? | ||
-- Error: tests/neg-custom-args/captures/reaches2.scala:10:10 ---------------------------------------------------------- | ||
10 | ps.map((x, y) => compose1(x, y)) // error // error // error | ||
| ^ | ||
|reference ps* is not included in the allowed capture set {} | ||
|of an enclosing function literal with expected type ((box A ->{ps*} A, box A ->{ps*} A)) -> box (x$0: A^?) ->? A^? | ||
-- Error: tests/neg-custom-args/captures/reaches2.scala:10:13 ---------------------------------------------------------- | ||
10 | ps.map((x, y) => compose1(x, y)) // error // error // error | ||
| ^ | ||
|reference ps* is not included in the allowed capture set {} | ||
|of an enclosing function literal with expected type ((box A ->{ps*} A, box A ->{ps*} A)) -> box (x$0: A^?) ->? A^? | ||
-- Error: tests/neg-custom-args/captures/reaches2.scala:10:31 ---------------------------------------------------------- | ||
10 | ps.map((x, y) => compose1(x, y)) // error // error // error | ||
| ^ | ||
| Separation failure: argument of type (x$0: A) ->{y} box A^? | ||
| to method compose1: [A, B, C](f: A => B, g: B => C): A ->{f, g} C | ||
| corresponds to capture-polymorphic formal parameter g of type box A^? => box A^? | ||
| and captures {ps*}, but this capability is also passed separately | ||
| in the first argument with type (x$0: A) ->{x} box A^?. | ||
| | ||
| Capture set of first argument : {x} | ||
| Hidden set of current argument : {y} | ||
| Footprint of first argument : {x, ps*} | ||
| Hidden footprint of current argument : {y, ps*} | ||
| Declared footprint of current argument: {} | ||
| Undeclared overlap of footprints : {ps*} |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import language.`3.8` // sepchecks on | ||
|
||
class List[+A]: | ||
def map[B](f: A -> B): List[B] = ??? | ||
|
||
def compose1[A, B, C](f: A => B, g: B => C): A ->{f, g} C = | ||
z => g(f(z)) | ||
|
||
def mapCompose[A](ps: List[(A => A, A => A)]): List[A ->{ps*} A] = | ||
ps.map((x, y) => compose1(x, y)) // error // error | ||
ps.map((x, y) => compose1(x, y)) // error // error // error | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import language.`3.7` // sepchecks on | ||
import language.`3.8` // sepchecks on | ||
|
||
class CC | ||
type Cap = CC^ | ||
|
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