Default values and reflection


#1

I'm trying to figure out how to call a constructor that has default values using reflection. For the constructor parameters, there are JetValueParameter annotations that tell you that the constructor parameter has a default value or not, but I can't find any way to get the default value. Is this possible in the current builds?


Kotlin Reflection and Default Values
#2

It is not possible and shouldn't be. The right way to call such a constructor is to pass it an extra argument of type int which is a bitmask telling which parameters take default values.