-
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.
Store capability class information in a hash map during cc
- Loading branch information
Showing
5 changed files
with
58 additions
and
35 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
30 changes: 30 additions & 0 deletions
30
tests/neg-custom-args/captures/extending-impure-function.scala
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,30 @@ | ||
class F1 extends (Int => Unit) { | ||
def apply(x: Int): Unit = () | ||
} | ||
|
||
class F2 extends (Int -> Unit) { | ||
def apply(x: Int): Unit = () | ||
} | ||
|
||
def test = | ||
val x1 = new (Int => Unit) { | ||
def apply(x: Int): Unit = () | ||
} | ||
|
||
val x2: Int -> Unit = new (Int => Unit) { // error | ||
def apply(x: Int): Unit = () | ||
} | ||
|
||
val x3: Int -> Unit = new (Int -> Unit) { | ||
def apply(x: Int): Unit = () | ||
} | ||
|
||
val y1: Int => Unit = new F1 | ||
val y2: Int -> Unit = new F1 // error | ||
val y3: Int => Unit = new F2 | ||
val y4: Int -> Unit = new F2 | ||
|
||
val z1 = () => () | ||
val z2: () -> Unit = () => () | ||
val z3: () -> Unit = z1 | ||
val z4: () => Unit = () => () |
18 changes: 0 additions & 18 deletions
18
tests/neg-custom-args/captures/extending-impure-function.scala.scala
This file was deleted.
Oops, something went wrong.