gpt4 book ai didi

scala - 值 YpartialUnification 不是 scala.tools.nsc.Settings 的成员

转载 作者:行者123 更新时间:2023-12-02 19:36:05 24 4
gpt4 key购买 nike

我正在尝试在 REPL 中运行 scala cats。关注猫的 instructions我已经安装了 ammonite REPL 并将以下导入放入 predef.sc

nterp.configureCompiler(_.settings.YpartialUnification.value = true)
import $ivy.`org.typelevel::cats-core:2.2.0-M1`, cats.implicits._

运行amm时出现此错误。

predef.sc:1: value YpartialUnification is not a member of scala.tools.nsc.Settings
val res_0 = interp.configureCompiler(_.settings.YpartialUnification.value = true)
^
Compilation Failed

最佳答案

在 Scala 2.13 中部分统一为 enabled by default-Ypartial-unification 标志已被 Partial unification unconditional; deprecate -Xexperimental #6309 删除

Partial unification is now enabled unless -Xsource:2.12 is specified. The -Ypartial-unification flag has been removed and the -Xexperimental option, which is now redundant, has been deprecated.

因此编译器 no longer接受-Ypartial-unification

关于scala - 值 YpartialUnification 不是 scala.tools.nsc.Settings 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61035986/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com