Add monitoring for out-of-block-modification in function literals

This commit is contained in:
Nikolay Krasko
2012-06-04 20:29:42 +04:00
parent 0096430455
commit d55d2c7bcf
@@ -27,7 +27,6 @@ public final class JetModifiableBlockHelper {
}
// TODO: Need tests for this method
// TODO: Consider for FUNCTION_LITERALS
public static boolean shouldChangeModificationCount(PsiElement place) {
JetDeclaration declaration = PsiTreeUtil.getParentOfType(place, JetDeclaration.class, true);
if (declaration != null) {
@@ -47,6 +46,9 @@ public final class JetModifiableBlockHelper {
return shouldChangeModificationCount(property);
}
else if (declaration instanceof JetFunctionLiteral) {
return shouldChangeModificationCount(declaration);
}
}
return true;