Join Slack
Powered by
`someFun<SomeImplementation>()` and remove t...
# getting-started
k
karelpeeters
03/12/2019, 8:43 AM
someFun<SomeImplementation>()
and remove the
clazz
pqrameter.
😀 1
d
dG
03/12/2019, 8:44 AM
ah, without the ::class! Thanks
e
eason
03/12/2019, 8:45 AM
T::class.java call in you method is same as clazz: KClass<T>
d
dG
03/12/2019, 8:51 AM
@eason
I did not get that. Are you talking about the function args? KClass<T> would also enforce only kotlin classes, right?
e
eason
03/12/2019, 8:54 AM
if you want to get T’s class, you have already reified it so no need to pass class argument
eason
03/12/2019, 8:54 AM
use T::class.java directly
👍 1
7
Views
Open in Slack
Previous
Next