What is the use of different values in `enum class...
# compiler
a
What is the use of different values in
enum class NoLookupLocation : LookupLocation
in kotlin complier? I am trying to find if a particular method exist or not in the current compilation scope and need to pass the value of
LookupLocation
. Method I am using is below
Copy code
moduleDescriptor.getPackage(FqName("kotlin.sequences")).memberScope.getContributedFunctions(
    functionName,
    NoLookupLocation.FROM_BUILTINS
)
d
Different values here are mostly documentational. They all indicate that the request came not from analysis of sources but from some synthetic place or for internal need.
thank you color 1
Note that the whole descriptor API will be deprecated with K1, which will happen any time after 2.3 release.
a
Thanks for the update. Do you know what should be the recommend way in Analysis api to query if callableId can be resolved(method is present) from
kotlin.sequences
package?
d
I don't know, unfortunately. @dimonchik0036 could you help please?
d
I guess you might be interested in KaScope from the Analysis API (https://kotlin.github.io/analysis-api/scopes.html). KaPackageSymbol#packageScope is particular
Note that the Analysis API is not for compiler plugin development
a
I was working on one open issue in Detekt github repo. So Analysis Api is correct to use there right?
d
It is better to ask the repo maintainers/contribution guides – they might or might not support the Analysis API. A quick search led me to #detekt-8021