PsiManager manager = refExpr.getManager();
if (resolved instanceof PsiClass) {
result = manager.getElementFactory().createType((PsiClass) resolved);
} else if (resolved instanceof PsiVariable) {
result = ((PsiVariable) resolved).getType();
<BUG>} else if (resolved instanceof PsiMethod) {
PsiElement nameElement = refExpr.getReferenceNameElement();
PsiElement prev = PsiTreeUtil.skipSiblingsBackward(nameElement, PsiWhiteSpace.class);
if (prev != null && prev.getNode().getElementType() == GroovyTokenTypes.mMEMBER_POINTER) {</BUG>
return manager.getElementFactory().createTypeByFQClassName("groovy.lang.Closure", refExpr.getResolveScope());

PsiManager manager = refExpr.getManager();
if (resolved instanceof PsiClass) {
result = manager.getElementFactory().createType((PsiClass) resolved);
} else if (resolved instanceof PsiVariable) {
result = ((PsiVariable) resolved).getType();
} else if (resolved instanceof PsiMethod) {
if (dotType == GroovyTokenTypes.mMEMBER_POINTER) {
return manager.getElementFactory().createTypeByFQClassName("groovy.lang.Closure", refExpr.getResolveScope());
