gpt4 book ai didi

scala - 函数定义杀死了 Scala 编译器

转载 作者:行者123 更新时间:2023-12-02 04:13:31 25 4
gpt4 key购买 nike

任何人都可以向我解释为什么当我将其输入到 Scala REPL 中时此条目会杀死编译器吗?

def combination(x: Int, y: Int, f: (Int,Int) => Int) = f(x,y)

我使用的是 Scala 2.11.5

    at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:904)
at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:904)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

That entry seems to have slain the compiler.
Shall I replay your session? I can re-run each line except the last one.

最佳答案

这是2.11.5的bug,SI-9089已在2.11.6修复。 https://issues.scala-lang.org/browse/SI-9089

关于scala - 函数定义杀死了 Scala 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35215163/

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