From 675fa42c8050fbd2f82ac7637a07d844b8c21fb4 Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Thu, 6 Mar 2014 17:44:13 +0400 Subject: [PATCH] fix tests. Rebinding for 'def' reference should do nothing because it references to an inferred variable's type or to a variable itself. --- .../psi/impl/statements/GrVariableDeclarationImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/GrVariableDeclarationImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/GrVariableDeclarationImpl.java index 6e312234decb..e1ef4491d27b 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/GrVariableDeclarationImpl.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/GrVariableDeclarationImpl.java @@ -242,6 +242,11 @@ public class GrVariableDeclarationImpl extends GrStubElementBase impl public Object[] getVariants() { return EMPTY_ARRAY; } + + @Override + public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException { + return getElement(); + } }; } else { @@ -257,6 +262,11 @@ public class GrVariableDeclarationImpl extends GrStubElementBase impl public Object[] getVariants() { return EMPTY_ARRAY; } + + @Override + public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException { + return getElement(); + } }; } }