Skip to content

Commit

Permalink
Fixed bug where local variables to for-each clauses where flagged as …
Browse files Browse the repository at this point in the history
…requiring the final modifier.
  • Loading branch information
Michael Studman committed Dec 19, 2004
1 parent c83b8ee commit 9bcd88c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Expand Up @@ -112,7 +112,9 @@ public void visitToken(DetailAST aAST)
break;
}
case TokenTypes.VARIABLE_DEF:
if (aAST.getParent().getType() != TokenTypes.OBJBLOCK) {
if (aAST.getParent().getType() != TokenTypes.OBJBLOCK
&& aAST.getParent().getType() != TokenTypes.FOR_EACH_CLAUSE)
{
insertVariable(aAST);
}
break;
Expand Down
Expand Up @@ -126,3 +126,14 @@ abstract class AbstractClass
{
public abstract void abstractMethod(int aParam);
}

class Blah
{
static
{
for(int a : some.getInts())
{

}
}
}

0 comments on commit 9bcd88c

Please sign in to comment.