Calling a Java function that takes a non-generic parameter of a generic type


#1

I honestly didn’t know how to word that title any shorter.
Basically, the problem is that I have a library with a method of the following signature:
public void method(Class parameter) { throw new RuntimeException("Stub!"); }
and I can’t find a way to call it from Kotlin. If I try with a ::class.java as parameter, I get the following error:
required: java.lang.Class! found: java.lang.Class<com.example.package.Test>
Trying as java.lang.Class didn’t help either.
Is there anything specific I can do to call a method like that or is that not possible in Kotlin right now?

Thanks in advance for any help.


#2

method(Foo::class.java) works fine for me, with 1.0-beta-4.