mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
dfa: add a test for assignment with side effects inside method calls (IDEA-145401, IDEA-CR-5542)
This commit is contained in:
@@ -6,4 +6,14 @@ class Contracts {
|
||||
return x && <warning descr="Condition '!(x = false)' is always 'true' when reached">!(x =<caret> false)</warning>;
|
||||
}
|
||||
|
||||
public void testSideEffectInsideCall() {
|
||||
if (a()) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean a() {
|
||||
return x = false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user