summaryrefslogblamecommitdiff
path: root/test/files/neg/varargs.scala
blob: 657750ec8f5e3c6bcc10761a1a42ef5b42ef31b9 (plain) (tree)
1
2
3
4
5
6
7
8
9








                             
  


                                        
  


                                                      
  



                                                   

                                     
   
  
 
import annotation.varargs



// Failing varargs annotation
object Test {
  
  trait A {
    def v1(a: Int, b: Array[String]) = a
  }
  
  trait B extends A {
    @varargs def v1(a: Int, b: String*) = a + b.length
  }
  
  @varargs def nov(a: Int) = 0
  @varargs def v(a: Int, b: String*) = a + b.length
  @varargs def v2(a: Int, b: String*) = 0
  def v2(a: Int, b: Array[String]) = 0
  
  def main(args: Array[String]) {    
  }
  
}