Index: compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java,v retrieving revision 1.273 diff -u -r1.273 Parser.java --- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 2 Dec 2004 12:35:38 -0000 1.273 +++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 3 Dec 2004 10:15:09 -0000 @@ -3171,7 +3171,11 @@ AbstractVariableDeclaration variableDecl = (AbstractVariableDeclaration) this.astStack[this.astPtr]; variableDecl.declarationSourceEnd = variableDecl.declarationEnd; - + if(this.currentElement != null && this.currentElement instanceof RecoveredField) { + if(this.endStatementPosition > variableDecl.sourceEnd) { + this.currentElement.updateSourceEndIfNecessary(this.endStatementPosition); + } + } this.recoveryExitFromVariable(); } protected void consumeExplicitConstructorInvocation(int flag, int recFlag) { @@ -6870,6 +6874,9 @@ break; //let extra semantic action decide when to push case TokenNameRBRACKET : + this.endPosition = this.scanner.startPosition; + this.endStatementPosition = this.scanner.currentPosition - 1; + break; case TokenNamePLUS : case TokenNameMINUS : case TokenNameNOT :