Kotlin Reflection : How to add a KFunction to a list via reflection?
I want to add to a MutableListUint> at run-time depending on the type. I mostly got it, but I can't figure out how to get the instance info into the KFunction I have.
This code is a bit contrived, but it's a stripped down example of what I'm trying to do. I'm trying to get rid of a bunch of boiler plate code by wiring up dispatch at runtime.
This code compiles, but blows up at runtime when using the lists with the error :
java.lang.IllegalArgumentException: Callable expects 2 arguments, but 1...