0

what is the equivalent kotlin of the following java code:

F f=new F();
convert(f, HashMap.class);

This is what i have tried so far

val f = F()
convert(f, HashMap<*, *>::class.java)

This is the error i am getting:

Only classes are allowed on the left hand side of a class literal

s curious
  • 65
  • 2
  • 10

1 Answers1

2

I think you could just do this:

convert(form, HashMap::class.java)
zsmb13
  • 85,752
  • 11
  • 221
  • 226