mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
foreach loop variable shouldn't be visible from the loop expression (IDEA-55859)
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
public class Bar {{
|
||||
for (java.util.List trololo : trolo<caret>) {
|
||||
|
||||
}
|
||||
} }
|
||||
+1
-1
@@ -181,7 +181,7 @@ public class a {
|
||||
}
|
||||
|
||||
void forEachParam(java.io.File x) {
|
||||
for (java.io.File f: <error descr="Variable 'f' might not have been initialized">f</error>.listFiles()) {
|
||||
for (java.io.File f: <error descr="Cannot resolve symbol 'f'">f</error>.listFiles()) {
|
||||
forEachParam(f);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -910,6 +910,8 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
|
||||
|
||||
public void testEmptyListWithCollectionsPrefix() throws Throwable { doItemTest(); }
|
||||
|
||||
public void testForeachLoopVariableInIterableExpression() throws Throwable { doAntiTest(); }
|
||||
|
||||
public void testStaticallyImportedMagicMethod() throws Throwable {
|
||||
configureByTestName();
|
||||
assertStringItems("foo");
|
||||
|
||||
Reference in New Issue
Block a user