@Override protected void consumeExitVariableWithInitialization() { super.consumeExitVariableWithInitialization(); if ((this.currentToken == TokenNameCOMMA || this.currentToken == TokenNameSEMICOLON) && this.astStack[this.astPtr] instanceof FieldDeclaration) { if (this.sourceEnds != null) { this.sourceEnds.put(this.astStack[this.astPtr], this.scanner.currentPosition - 1); } } // does not keep the initialization if completion is not inside AbstractVariableDeclaration variable = (AbstractVariableDeclaration) this.astStack[this.astPtr]; if (this.cursorLocation + 1 < variable.initialization.sourceStart || this.cursorLocation > variable.initialization.sourceEnd) { if (!variable.type.isTypeNameVar(null)) { if (! (variable instanceof LocalDeclaration && ((LocalDeclaration)variable).isTypeNameVar(this.compilationUnit.scope))) { variable.initialization = null; } } } else if (this.assistNode != null && this.assistNode == variable.initialization) { this.assistNodeParent = variable; } if (triggerRecoveryUponLambdaClosure(variable, false)) { if (this.currentElement != null) { this.restartRecovery = true; } } } @Override
return AnnotationTargetAllowed.YES; } else if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) { if (localVariableBinding.declaration.isTypeNameVar(scope)) { return AnnotationTargetAllowed.NO; } else if (isTypeUseCompatible(localVariableBinding.declaration.type, scope)) {
boolean isTypeNameVar = isTypeNameVar(scope); if (isTypeNameVar) { if ((this.bits & ASTNode.IsForeachElementVariable) == 0) {
if (this.elementVariable.isTypeNameVar(upperScope)) { if (this.elementVariable.type.dimensions() > 0 || this.elementVariable.type.extraDimensions() > 0) { upperScope.problemReporter().varLocalCannotBeArray(this.elementVariable);