Vinz243 :
Is there a way to declare a method from a java class so that it is callable as an infix
function from kotlin, like this :
public class Foo {
public void doFoo (String bar) {}
}
Then from a kotlin file
foo doFoo "bar"
Joe Clay :
Since Java has no way of marking methods for which it makes sense to use the operator syntax, Kotlin allows using any Java methods with the right name and signature as operator overloads and other conventions (
invoke()
etc.) Calling Java methods using the infix call syntax is not allowed.