Hi, please some one fix this ```prop.returnType.is...
# reflect
t
Hi, please some one fix this
Copy code
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
If you don't want to use
typeOf
you can use this:
Copy code
val arrayListStringType = ArrayList::class.createType(
    arguments = listOf(
        KTypeProjection(KVariance.INVARIANT, String::class.createType())
    )
)
prop.returnType.isSubtypeOf(arrayListStringType)
t
thanks!