mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-153437 Do not suggest to loop over the loop variable (and don't duplicate "new")
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Test {
|
||||
{
|
||||
|
||||
ArrayList<Node> nodes = new ArrayList<>();
|
||||
for (Node n : n<caret>)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Node {}
|
||||
+5
@@ -167,6 +167,11 @@ public class VariablesCompletionTest extends LightFixtureCompletionTestCase {
|
||||
assertStringItems("stringBuffer", "buffer");
|
||||
}
|
||||
|
||||
public void testDontIterateOverLoopVariable() throws Throwable {
|
||||
configure()
|
||||
myFixture.assertPreferredCompletionItems 0, 'nodes', 'new', 'null'
|
||||
}
|
||||
|
||||
public void testDuplicateSuggestionsFromUsage() {
|
||||
configure();
|
||||
assertStringItems("preferencePolicy", "policy", "aPreferencePolicy");
|
||||
|
||||
Reference in New Issue
Block a user