次のようなJavaで定義されたメソッドがあります。
void foo(int x, Thing... things)
Scala でそれをオーバーライドする必要がありますが、どちらもエラーになります。
override def foo(x: Int, things: Thing*)
override def foo(x: Int, things: Array[Thing])
エラーは参照して<repeated...>
いますが、それが何であるかわかりません。
アップデート
うーん…気にしないで。私は 2.10.0 を使用していますが、タイプミスがあり、メソッド本体がありませんでした。その後、このエラー メッセージに混乱しましたが、これはまだ奇妙に思えます。SBT では:
> compile
[info] Compiling 1 Scala source to [...]/target/scala-2.10/classes...
[error] [...]/src/main/scala/Translator.scala:41: class MyMethodVisitor needs to be abstract, since method visitTableSwitchInsn is not defined
[error] (Note that org.objectweb.asm.Label* does not match <repeated...>[org.objectweb.asm.Label])
[error] class MyMethodVisitor extends MethodVisitor (Opcodes.ASM4) {
[error] ^
問題は、visitTableSwitchInsn
単に本体がないことですが、エラーは、問題が varargs パラメーターの型であることを示唆しています。