Trying to overload a method with multiple parameter groups, where the 2nd parameter type differs doesn't seem to work. This will not compile:
class Foo {
def boo(a: String)(b: String): Unit = ()
def boo(a: String)(b: Int): Unit = boo(a)(b.toString)
}
I would have thought that it would be compiled into boo(String, String) and boo(String,Int) methods and thus be ok in the JVM. But I guess not.
What I'm looking for is a workaround - I want to keep the parameter groups and the overloaded name so its transparent to the caller, but any other hacks are welcome.