Closed tbu- closed 8 years ago
Yes.
This is one of many cases where bytecode can do something that can't be represented in Java source.
Thanks for the answer. Could this be worked around by mangling the function names?
It could, but it doesn't make sense to do that by default due to the obvious issues with reflection and inheritance. You could always add ad-hoc mangling if you want, though it's admittedly not so easy to extend right now. I was experimenting with a plugin system earlier but never got around to fleshing it out.
When decompiling the scala standard library to Java source files, things like this happen:
This will not compile because the methods only differ by their return types.
From what I can tell this is supported by the bytecode because function calls contain the desired function signature, but not by the Java language.
Question: Is my interpretation of this correct?