We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43ef239 commit d839bccCopy full SHA for d839bcc
library/src/scala/caps/Pure.scala
@@ -6,6 +6,15 @@ import language.experimental.captureChecking
6
/** A marker trait that declares that all inheriting classes are "pure" in the
7
* sense that their values retain no capabilities including capabilities needed
8
* to perform effects. This has formal meaning only under capture checking.
9
+ *
10
+ * NOTE: If an upper bound is Pure, we check that an argument conforms to it only
11
+ * in sources where capture checking is enabled. For instance,
12
13
+ * def f[C <: Pure]()
14
+ * f[Object]()
15
16
+ * would give an error only under capture checking. Pure is also dropped in
17
+ * upper bounds if it forms part of an &-type, or is under a type lambda.
18
*/
19
trait Pure:
20
this: Pure =>
0 commit comments