You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was discovered with Kotlin 1.3.41; maybe it's been fixed in a newer version.
In Electron Cash, I passed Python a reference to a Kotlin function with arguments (String, vararg PyObject). As expected, this was represented as an object with a method invoke(String, PyObject[]).
However, the method isn't marked as varargs in the Java reflection interface, so it can only be called with exactly one array-compatible argument. Passing anything else will invoke the base interface method Function2(Object, Object), which gives the error "is abstract and cannot be called".
I can't find any references to anyone else seeing this in the reflection API, but here's someone who says that a vararg Kotlin method decompiled into a vararg Java method.
The first step would be to look at the generated class file and see whether the method is marked as vararg there.
The text was updated successfully, but these errors were encountered:
This issue was discovered with Kotlin 1.3.41; maybe it's been fixed in a newer version.
In Electron Cash, I passed Python a reference to a Kotlin function with arguments
(String, vararg PyObject)
. As expected, this was represented as an object with a methodinvoke(String, PyObject[])
.However, the method isn't marked as varargs in the Java reflection interface, so it can only be called with exactly one array-compatible argument. Passing anything else will invoke the base interface method
Function2(Object, Object)
, which gives the error "is abstract and cannot be called".I can't find any references to anyone else seeing this in the reflection API, but here's someone who says that a vararg Kotlin method decompiled into a vararg Java method.
The first step would be to look at the generated class file and see whether the method is marked as vararg there.
The text was updated successfully, but these errors were encountered: