Don't create OutOfBlock modification inside mulitdeclarations

This commit is contained in:
Nikolay Krasko
2012-09-14 20:00:14 +04:00
parent fb5e2333ac
commit 8d551c8947
3 changed files with 15 additions and 0 deletions
@@ -51,6 +51,9 @@ public final class JetModifiableBlockHelper {
return shouldChangeModificationCount(property);
}
else if (declaration instanceof JetMultiDeclaration || declaration instanceof JetMultiDeclarationEntry) {
return shouldChangeModificationCount(declaration);
}
else if (declaration instanceof JetFunctionLiteral) {
// TODO: Check return type
return shouldChangeModificationCount(declaration);
@@ -0,0 +1,8 @@
// FALSE
data class Test(val a : Int, val b : Int)
fun a() {
val (test, <caret>other) = Test(11, 12)
}
@@ -54,6 +54,10 @@ public class OutOfBlockModificationTest extends LightCodeInsightFixtureTestCase
doTest();
}
public void testInFunInMultiDeclaration() {
doTest();
}
public void testInFunWithInference() {
doTest();
}