Kotlin invokes wrong overloaded java method with variable number of arguments


#1

I have two java methods:

Object get(A a)
Object get(A a, B... b)

and when I’m trying to invoke first method in Kotlin

get(someInstance)

It always invokes second method with empty second parameter.

How could I call first method from Kotlin in this case?


#2

Can you provide more details/code? It shouldn’t call second method… I tried with same type for A and B but even in this case it calls the correct method.