inline local: don't enable short circuit when detecting refs/defs (IDEA-195332)

This commit is contained in:
Anna.Kozlova
2018-07-17 12:43:01 +02:00
parent a58ea0ea0a
commit 13b3a8675a
4 changed files with 16 additions and 1 deletions
@@ -397,7 +397,7 @@ public class DefUseUtil {
RefsDefs(@NotNull PsiCodeBlock body) throws AnalysisCanceledException {
this.body = body;
flow = ControlFlowFactory.getInstance(body.getProject()).getControlFlow(body, ourPolicy);
flow = ControlFlowFactory.getInstance(body.getProject()).getControlFlow(body, ourPolicy, false, false);
instructions = flow.getInstructions();
}
@@ -0,0 +1,6 @@
class MyTest {
{
int <caret>j = 0;
System.out.println(false ? j : 'x');
}
}
@@ -0,0 +1,5 @@
class MyTest {
{
System.out.println(false ? 0 : 'x');
}
}
@@ -270,6 +270,10 @@ public class InlineLocalTest extends LightCodeInsightTestCase {
doTest(false);
}
public void testDisableShortCircuit() {
doTest(false);
}
public void testOperationPrecedenceWhenInlineToStringConcatenation() {
doTest(false);
}