Skip to content

Commit af897ca

Browse files
committed
Add capture checking to scala/language.scala
Note that to compile this version of the library we do not patch the library with `scala.runtime.stdLibPatches`.
1 parent e1efffd commit af897ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scala2-library-cc/src/scala/language.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ object language {
188188

189189
import languageFeature.experimental._
190190

191+
/** Experimental support for capture checking; implies support for pureFunctions
192+
*
193+
* @see [[https://dotty.epfl.ch/docs/reference/experimental/cc]]
194+
*/
195+
implicit lazy val captureChecking: existentials = languageFeature.existentials
196+
191197
/** Only where this feature is enabled, are macro definitions allowed.
192198
* If `macros` is not enabled, macro definitions are rejected by the compiler.
193199
*

0 commit comments

Comments
 (0)