// iteration on each field
while (index < length) {
char[] token = this.tokens[index];
if (type == null) return null; // could not resolve type prior to this point
FieldBinding field = scope.getField(type, token, this);
int place = index - this.indexOfFirstFieldBinding;
this.otherBindings[place] = field;
if (!field.isValidBinding()) {
// try to retrieve the field as private field
CodeSnippetScope localScope = new CodeSnippetScope(scope);
if (this.delegateThis == null) {
if (this.evaluationContext.declaringTypeName != null) {
this.delegateThis = scope.getField(scope.enclosingSourceType(), DELEGATE_THIS, this);
if (this.delegateThis == null){ // if not found then internal error, field should have been found
return super.reportError(scope);
}
} else {
this.constant = Constant.NotAConstant; //don't fill other constants slots...
scope.problemReporter().invalidField(this, field, index, type);
return null;
}
}
field = localScope.getFieldForCodeSnippet(this.delegateThis.type, token, this);
this.otherBindings[place] = field;
}
if (field.isValidBinding()) {
// only last field is actually a write access if any
if (isFieldUseDeprecated(field, scope, (this.bits & IsStrictlyAssigned) !=0 && index+1 == length)) {
scope.problemReporter().deprecatedField(field, this);
}
// constant propagation can only be performed as long as the previous one is a constant too.
if (this.constant != Constant.NotAConstant){
this.constant = field.constant();
}
type = field.type;
index++;
} else {
this.constant = Constant.NotAConstant; //don't fill other constants slots...