我是 Scala 的新手......这是代码:
def ack2(m: BigInt, n: BigInt): BigInt = {
val z = BigInt(0)
(m,n) match {
case (z,_) => n+1
case (_,z) => ack2(m-1,1) // Compiler says unreachable code on the paren of ack2(
case _ => ack2(m-1, ack2(m, n-1)) // Compiler says unreachable code on the paren of ack2(
}
}
我试图理解......为什么会出现这个错误?
注意:我正在使用 Scala Eclipse 插件 2.8.0.r21376-b20100408034031 ch.epfl.lamp.sdt.feature.group