There is no way in Java FFI to resolve that correctly
SlimerDudeMon 11 Mar 2013
:( Guess I'll have to make a helper Java class then...
Fantom:
using [java] com.wotever::Doofus
class DoofusHelper {
static native Doofus doofusFromInt(Int value)
static native Doofus doofusFromLong(Int value)
}
Java:
package fan.wotever;
public class DoofusHelperPeer {
public static DoofusHelper make(DoofusHelper self) {
return new DoofusHelper();
}
public static Doofus doofusFromInt(long value) {
return new Doofus((int) value);
}
public static Doofus doofusFromLong(Long value) {
return new Doofus(long);
}
}
SlimerDude Mon 11 Mar 2013
I have a Java class similar to this:
How to I call one constructor over the other?
gives an
Ambiguous call <ctor>(sys::Int)
.brian Mon 11 Mar 2013
There is no way in Java FFI to resolve that correctly
SlimerDude Mon 11 Mar 2013
:( Guess I'll have to make a helper Java class then...
Fantom:
Java: