in src/java/org/jetbrains/plugins/clojure/psi/impl/defs/ClDefImpl.java [82:112]
public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) {
// Do not resolve identifier
if (lastParent != null && lastParent.getParent() == this && lastParent instanceof ClSymbol) return true;
//process parameters
if (lastParent != null && lastParent.getParent() == this) {
final ClVector paramVector = findChildByClass(ClVector.class);
if (paramVector != null) {
for (ClSymbol symbol : paramVector.getAllSymbols()) {
if (!ResolveUtil.processElement(processor, symbol)) return false;
}
}
// for recursive functions
if (getNameSymbol() != null && lastParent != getNameSymbol() && !ResolveUtil.processElement(processor, getNameSymbol())) return false;
else if (lastParent instanceof ClList) { // overloaded function (defn ([x] body))
ClList list = (ClList) lastParent;
final PsiElement elem = list.getFirstNonLeafElement();
if (elem instanceof ClVector && !PsiTreeUtil.isAncestor(elem, place, false)) {
final ClVector params = (ClVector) elem;
if (params != null) {
for (ClSymbol symbol : params.getAllSymbols()) {
if (!ResolveUtil.processElement(processor, symbol)) return false;
}
}
}
}
return true;
} else {
return ResolveUtil.processElement(processor, this);
}
}