One way that has been suggested to deal with double definitions of overloaded methods is to replace overloading with pattern matching:
object Bar { def fo
Dotty, a new experimental Scala compiler, supports union types (written A | B), so you can do exactly what you wanted:
A | B
def foo(xs: (String | Int)*) = xs foreach { case _: String => println("str") case _: Int => println("int") }