mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-66822 Cannot introduce constant out of identity closure
This commit is contained in:
+1
-1
@@ -207,7 +207,7 @@ public class GrIntroduceConstantHandler extends GrIntroduceHandlerBase<GrIntrodu
|
||||
if (resolved instanceof PsiVariable) {
|
||||
if (!isStaticFinalField((PsiVariable)resolved)) {
|
||||
if (expr instanceof GrClosableBlock) {
|
||||
if (!PsiTreeUtil.isAncestor(scope, resolved, true)) {
|
||||
if (!PsiTreeUtil.isContextAncestor(scope, resolved, true)) {
|
||||
throw new GrIntroduceRefactoringError(GroovyRefactoringBundle.message("closure.uses.external.variables"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user