Currently what I have is `expression.getCallNameEx...
# detekt
p
Currently what I have is
expression.getCallNameExpression()?.textMatches("forEach")
where
expression
is a
KtCallExpression
and I would like to also check that the class of the caller is a
Map
or something implementing a
Map
. This is the part though where I am getting it wrong, because it does not seem to be like UAST, where you can check the
qualifiedName
of elements.
s
@pavlospt there’s currently no type and symbol solving in detekt. You can try your luck here https://discuss.kotlinlang.org/t/symbol-solver-api-in-kotlin/4927
Asking in the compiler channel might also help.
👍 1
p
Great! That’s the answer I was looking for 😛 I was not sure it was doable!
Thank you for your help!