Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9132213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:16:23+00:00 2026-06-17T08:16:23+00:00

I have a method defined in Java like: void foo(int x, Thing… things) I

  • 0

I have a method defined in Java like:

void foo(int x, Thing... things)

I need to override that in Scala, but both of these give errors:

override def foo(x: Int, things: Thing*)
override def foo(x: Int, things: Array[Thing])

The errors refer to <repeated...> but I don’t know what that is.

Update

Ugg… nevermind. I’m in 2.10.0, and I had mis-typed something and didn’t have a method body. Then I got confused by this error message, which still seems a odd to me. In 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]         ^

The problem is that my visitTableSwitchInsn simply lacks a body, but the error suggests that the problem is the type of the varargs parameter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:16:24+00:00Added an answer on June 17, 2026 at 8:16 am

    Java:

    package rrs.scribble;
    
    public
    class   VA1
    {
        public int va1(int... ints) {
            return ints.length;
        }
    }
    

    Scala:

    package rrs.scribble
    
    class   VA1S
    extends VA1
    {
      override
      def va1(ints: Int*): Int =
        ints.length * 2
    }
    

    SBT:

    > ~compile
    [info] Compiling 1 Scala source and 1 Java source to …/scribble/target/scala-2.10/classes...
    [success] Total time: 4 s, completed Jan 15, 2013 3:48:14 PM
    1. Waiting for source changes... (press enter to interrupt)
    

    This is Scala 2.10, which is consistent with @TravisBrown’s comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a parent-child that defines some method .foo() like this: class Parent
i have a code like this i have defined the method goNext but still
I need to call a method I have defined as: -(IBAction)next:(id)sender{ ... } I
I have a wcf service defined like this: [OperationContract] [WebInvoke(Method = POST, ResponseFormat =
First I would like to say that I have only worked with java for
I have a Java GUI program that simulates a simple text field(to be like
I have what seems like a very simple method, written in java for an
I have class where the relevant part looks like class C { void Method<T>(SomeClass<T>
As you know, in a java interface, all methods have to be defined as
I have a method defined in IDL as follows : interface IMyFunc : IDispatch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.