我正在dup illegal arguments exception
输入以下代码。
package tests.kiama
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.kiama.rewriting.Rewriter._
@RunWith(classOf[JUnitRunner])
class KiamaRewrite extends FunSuite {
test("test1") {
abstract class E
case class B(l: E, r: E) extends E
case class P() extends E
case class Q() extends E
case class PP() extends E
case class QQ() extends E
val t = B(P(), Q())
val d = rule {
case P() => PP()
case Q() => QQ()
}
val s = bottomup(d)(t)
println("done")
}
}
例外:
java.lang.RuntimeException: dup illegal arguments: public tests.kiama.KiamaRewrite$$anonfun$1$B$2(tests.kiama.KiamaRewrite$$anonfun$1,tests.kiama.KiamaRewrite$$anonfun$1$E$1,tests.kiama.KiamaRewrite$$anonfun$1$E$1) (PP(),QQ()), expects 3
我正在使用 kiama 图书馆。http://code.google.com/p/kiama/