definingClass)) {
return new ErrorResult(node, CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
}
String variableName = argumentCount < 1 ? null : argumentValues[0].getStringValue();
if (definingClass == typeProvider.getBoolType()) {
DartObject valueFromEnvironment;
valueFromEnvironment = declaredVariables.getBool(typeProvider, variableName);
return computeValueFromEnvironment(
valueFromEnvironment,
new DartObjectImpl(typeProvider.getBoolType(), BoolState.FALSE_STATE),
namedArgumentValues);
} else if (definingClass == typeProvider.getIntType()) {
DartObject valueFromEnvironment;
valueFromEnvironment = declaredVariables.getInt(typeProvider, variableName);
return computeValueFromEnvironment(
valueFromEnvironment,
new DartObjectImpl(typeProvider.getNullType(), NullState.NULL_STATE),
namedArgumentValues);
} else if (definingClass == typeProvider.getStringType()) {
DartObject valueFromEnvironment;
valueFromEnvironment = declaredVariables.getString(typeProvider, variableName);
return computeValueFromEnvironment(
valueFromEnvironment,
new DartObjectImpl(typeProvider.getNullType(), NullState.NULL_STATE),
namedArgumentValues);