switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.VARIABLE : // =========only variable============
case Binding.VARIABLE | Binding.TYPE : //====both variable and type============
if (this.binding instanceof VariableBinding) {
VariableBinding variable = (VariableBinding) this.binding;
TypeBinding variableType;
if (this.binding instanceof LocalVariableBinding) {
this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
this.bits |= Binding.LOCAL;
if (!variable.isFinal() && (this.bits & ASTNode.DepthMASK) != 0) {
scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding)variable, this);
}
variableType = variable.type;
this.constant = (this.bits & ASTNode.IsStrictlyAssigned) == 0 ? variable.constant() : Constant.NotAConstant;
} else {
// a field
variableType = checkFieldAccess(scope);
}
// perform capture conversion if read access
if (variableType != null) {
this.resolvedType = variableType = (((this.bits & ASTNode.IsStrictlyAssigned) == 0)
? variableType.capture(scope, this.sourceEnd)
: variableType);
if ((variableType.tagBits & TagBits.HasMissingType) != 0) {
if ((this.bits & Binding.LOCAL) == 0) {
// only complain if field reference (for local, its type got flagged already)
scope.problemReporter().invalidType(this, variableType);
}
return null;
}
}
return variableType;
}
// thus it was a type
this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
this.bits |= Binding.TYPE;
//$FALL-THROUGH$
case Binding.TYPE : //========only type==============
this.constant = Constant.NotAConstant;
//deprecated test
TypeBinding type = (TypeBinding)this.binding;
if (isTypeUseDeprecated(type, scope))
scope.problemReporter().deprecatedType(type, this);
type = scope.environment().convertToRawType(type, false /*do not force conversion of enclosing types*/);
return this.resolvedType = type;
}