Add monitoring for out-of-block-modification in function literals
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user