=== What steps will reproduce the problem ===
scala> def id[A](as: A*) = as id: [A](as: A*)A* scala> id[Int] _ res12: (Int*) => Int* = <function1> scala> res12(1) res13: Int* = WrappedArray(1) scala> res12(Nil :_*) res14: Int* = List()
=== What is the expected behavior? ===
According to the spec:
"4.6.2 Repeated Parameters
The last value parameter of a parameter section may be suffixed by “”, e.g. `(..., x:T).` The type of such a repeated parameter inside the method is then the sequence type `scala.Seq[T]`"
Firstly, the inferred type of `ids` should be `Seq[A]`.
Secondly, the eta expansion of `ids[Int] _` should result in `(Seq[Int]) => Seq[Int])`
=== What do you see instead? ===
The internal type of the repeated parameter leaks out; and, via eta expansion, results in a `Function1` with `def apply(v1: T*)`.
=== Additional information ===
=== What versions of the following are you using? ===
- Scala: 2.8.1