PsiType () { if (PsiImplUtil.isMainMethod(this)) { return PsiTypes.voidType(); } final GrTypeElement element = getReturnTypeElementGroovy(); if (element != null) { return element.getType(); } return null; }