IDEA-86929 Smart completion in "new " statement

This commit is contained in:
Maxim.Medvedev
2012-06-19 15:42:05 +04:00
parent b0012df3fb
commit edf3a54ed5
@@ -151,10 +151,8 @@ public class GroovyExpectedTypesProvider {
public void visitVariable(GrVariable variable) {
if (myExpression.equals(variable.getInitializerGroovy())) {
PsiType type = variable.getDeclaredType();
if (type != null) {
myResult = new TypeConstraint[]{new SubtypeConstraint(type, type)};
}
PsiType type = variable.getType();
myResult = new TypeConstraint[]{new SubtypeConstraint(type, type)};
}
}