t

    tateisu

    1 year ago
    Hi, please some one fix this
    prop.returnType.isSubtypeOf(ArrayList<String>::class.createType())
    this expression raise compile error "Only classes are allowed on the left hand side of a class literal"
    d

    diesieben07

    1 year ago
    If you don't want to use
    typeOf
    you can use this:
    val arrayListStringType = ArrayList::class.createType(
        arguments = listOf(
            KTypeProjection(KVariance.INVARIANT, String::class.createType())
        )
    )
    prop.returnType.isSubtypeOf(arrayListStringType)
    t

    tateisu

    1 year ago
    thanks!