Don't create OutOfBlock modification inside mulitdeclarations
This commit is contained in:
@@ -51,6 +51,9 @@ public final class JetModifiableBlockHelper {
|
|||||||
|
|
||||||
return shouldChangeModificationCount(property);
|
return shouldChangeModificationCount(property);
|
||||||
}
|
}
|
||||||
|
else if (declaration instanceof JetMultiDeclaration || declaration instanceof JetMultiDeclarationEntry) {
|
||||||
|
return shouldChangeModificationCount(declaration);
|
||||||
|
}
|
||||||
else if (declaration instanceof JetFunctionLiteral) {
|
else if (declaration instanceof JetFunctionLiteral) {
|
||||||
// TODO: Check return type
|
// TODO: Check return type
|
||||||
return shouldChangeModificationCount(declaration);
|
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();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testInFunInMultiDeclaration() {
|
||||||
|
doTest();
|
||||||
|
}
|
||||||
|
|
||||||
public void testInFunWithInference() {
|
public void testInFunWithInference() {
|
||||||
doTest();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user