From: Kensuke M. <mat...@ki...> - 2012-08-08 03:31:09
|
Arno, Thank you, I understand. > The only way to solve this is to name-mangle the > return type into the generated C function names. That is a little more > than a weekend project. I thought this can be done by xslt. Kensuke On 2012/08/08 2:01, Arno Puder wrote: > > this is an interesting problem. The Java language does not permit > overloading of methods whose signature only differ in the return type. > However, due to type erasing it can happen that on byte-code level you > end up having two methods that only differ in their return type and the > JVM can handle this. There has been a debate whether this should be > permissible or not and the semantics in Java 7 have changed: In Java 7, > the arguments need to be different *after* type erasure. Here is a nice > writeup that explains this better than I could: > http://notatube.blogspot.com/2010/07/interesting-change-to-method-signature.html > > So, wrt Java 7, XMLVM is doing the right thing, which of course doesn't > solve the Scala issue. The only way to solve this is to name-mangle the > return type into the generated C function names. That is a little more > than a weekend project. > > Arno > -- 松崎 憲介 (MATSUZAKI Kensuke) URL : http://www.kitec.co.jp/ |