|
Scala example source code file (varargs.scala)
The Scala varargs.scala source codeimport 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]) { } } Other Scala examples (source code examples)Here is a short list of links related to this Scala varargs.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.