Kotlin invokes wrong overloaded java method with variable number of arguments


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


It always invokes second method with empty second parameter.

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


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.