You can if you use reflection, but otherwise no. I...
# announcements
k
You can if you use reflection, but otherwise no. Instead consider adding a parameter for the constructor:
inline fun foo<reified T>(constr: () -> T) { ... }
. You might not even need the
reified
anymore.
e
interesting idea, I'll play with that, thanks
k
You can obtain a constructor reference with
::
, ie.
foo(::MyClass)
.