I'm trying to call a Java method from Kotlin but the compiler doesn't manage to find the proper signature.
The method has 2 signatures :
Observable<Query> createQuery(@NonNull final String table, @NonNull String sql, @NonNull String... args)
Observable<Query> createQuery(@NonNull final Iterable<String> tables, @NonNull String sql, @NonNull String... args)
Then in kotlin I just want to call this, which seems completely valid to me :
db.createQuery("users", "select * from users")
But the compiler say
None of the following functions can be called with the arguments supplied:
public open fun createQuery(android.support.annotation.NonNull tables: kotlin.(Mutable)Iterable<kotlin.String!>!, android.support.annotation.NonNull sql: kotlin.String!, android.support.annotation.NonNull vararg args: kotlin.String!): rx.Observable<com.squareup.sqlbrite.SqlBrite.Query!>! defined in com.squareup.sqlbrite.BriteDatabase
public open fun createQuery(android.support.annotation.NonNull table: kotlin.String!, android.support.annotation.NonNull sql: kotlin.String!, android.support.annotation.NonNull vararg args: kotlin.String!): rx.Observable<com.squareup.sqlbrite.SqlBrite.Query!>! defined in com.squareup.sqlbrite.BriteDatabase
I read Kotlin and Java method with vararg have some interrop issues, is there a way to fix that without using a java class as a bridge ?