I have this class:
case class Columna[T](nombre: String)
class Tabla {
def leeTodo[T](col: Columna[T], filtro: String, orderBy: String = "") = ...
def leeTodo[T0, T1](col0: Columna[T0], col1: Columna[T1], filtro: String, orderBy: String = "") = ...
def leeTodo[T0, T1, T2](col0: Columna[T0], col1: Columna[T1], col2: Columna[T2], filtro: String, orderBy: String = "") = ...
}
object admver extends Tabla {
}
This code used to compile with Scala 2.10.4. Now, I'm trying Scala 2.11.2, and I get this error message:
Error:(3, 8) in object admver, multiple overloaded alternatives of method leeTodo define default arguments.
The members with defaults are defined in class Tabla in package bd and class Tabla in package bd and class Tabla in package bd and class Tabla in package bd and class Tabla in package bd and class Tabla in package bd.
I think that there is no ambiguity between the different overloads.
I wonder if this is a bug in Scala 2.11 or a new "feature".
I've seen some old questions about the subject:
- Why does the Scala compiler disallow overloaded methods with default arguments?
- Can't I define defaults if I define multiple overloaded constructors in Scala?
but don't know if they still apply.