title: calling java varargs from scala with overloading
body: <p>It's another question about scala-java compatibility related to varargs feature. The key difference is that java's part is overloaded.</p>
  
  <p>It resembles this scala code:</p>
  
  <pre><code>object Test {
    def test( xa : String* ) = print( xa.mkString(",") )
    def test( xs : Seq[String] ) = print( xs.mkString(",") )
  }
  </code></pre>
  
  <p>Scala unlike java mark such overloading as invalid</p>
  
  <pre><code>error: double definition:
  def test(xa: String*): Unit at line 11 and
  def test(xs: Seq[String]): Unit at line 12
  have same type after erasure: (xa: Seq)Unit
           def test( xs : Seq[String] ) = print( xs.mkString(",") )
               ^
  </code></pre>
  
  <p>But java agrees to compile similar construction.</p>
  
  <p>That surprises scala and it produces an error trying to invoke appropriate java method. The scala compiler left "no `: _*' annotation allowed here (such annotations are only allowed in arguments to *-parameters)" message</p>
  
  <p>How to properly invoke varargs method under such conditions?</p>
  
  <hr>
  
  <p>I've found corresponding bug in the <a href="https://issues.scala-lang.org/browse/SI-4774" rel="nofollow">scala issues tracker</a></p>