foreach param visibility restored (IDEA-84676)

This commit is contained in:
anna
2012-04-16 17:21:30 +02:00
parent bc00139039
commit e5706b0fc5
3 changed files with 3 additions and 3 deletions
@@ -134,7 +134,7 @@ public class PsiForeachStatementImpl extends CompositePsiElement implements PsiF
@Override
public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) {
processor.handleEvent(PsiScopeProcessor.Event.SET_DECLARATION_HOLDER, this);
if (lastParent == null || lastParent.getParent() != this || lastParent == getIteratedValue())
if (lastParent == null || lastParent.getParent() != this /*|| lastParent == getIteratedValue()*/)
// Parent element should not see our vars
return true;
@@ -181,7 +181,7 @@ public class a {
}
void forEachParam(java.io.File x) {
for (java.io.File f: <error descr="Cannot resolve symbol 'f'">f</error>.listFiles()) {
for (java.io.File f: <error descr="Variable 'f' might not have been initialized">f</error>.listFiles()) {
forEachParam(f);
}
}
@@ -949,7 +949,7 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
public void testEmptyListWithCollectionsPrefix() throws Throwable { doItemTest(); }
public void testForeachLoopVariableInIterableExpression() throws Throwable { doAntiTest(); }
public void _testForeachLoopVariableInIterableExpression() throws Throwable { doAntiTest(); }
public void testStaticallyImportedMagicMethod() throws Throwable {
configureByTestName();