w

    wouterdoeland

    5 years ago
    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
    udalov

    udalov

    5 years ago
    To check if two KTypes 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