For example, FastUtil's IntArrayList
has a push
method that accepts both int
(primitive) and Integer
(boxed), but Kotlin sees these both as the same function push(Int)
, therefore I cannot use the function at all as the function is ambiguous.
What should I do when a Java library has overloads for both the primitive and boxed type?
(p.s. I am aware that I can use the add(int)
method. I am in search of what to do if I come across such a problem in the future.)