Join Slack
Powered by
Hi, how should I check whether a KType is equal to...
# reflect
w
wouterdoeland
08/07/2017, 8:58 AM
Hi, how should I check whether a KType is equal to another KType? For example: I want to check whether a parameter in the constructor of an object is a String
u
udalov
08/17/2017, 2:36 PM
To check if two `KType`s are equal, just use
==
. To check if the type is
String
, check that its
classifier
is equal to
String::class
, and its
isMarkedNullable
is false
136
Views
Open in Slack
Previous
Next