TwoClocks
04/16/2021, 6:02 PMif( someProp.returnType == Double::class )
In this case I could create an instance of a Double
and get it's type... but pretend the type is of a class that it's not easy/possible to get an instance of easily.diesieben07
04/16/2021, 6:34 PMKType.classifier
will give you the "raw type" (either KClass
or KTypeParameter
) which you can then compare to e.g. Double::class
TwoClocks
04/16/2021, 6:38 PM