IntConstant ic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
if (ic == null){
- Binary.Error_OperatorCannotBeApplied (ec, left, right, oper, loc);
return null;
}
if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
return new IntConstant (ec.BuiltinTypes, ((IntConstant) left).Value << lshift_val, left.Location);
- Binary.Error_OperatorCannotBeApplied (ec, left, right, oper, loc);
- break;
+ return null;
//
// There is no overflow checking on right shift
IntConstant sic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
if (sic == null){
- Binary.Error_OperatorCannotBeApplied (ec, left, right, oper, loc);
return null;
}
int rshift_val = sic.Value;
if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
return new IntConstant (ec.BuiltinTypes, ((IntConstant) left).Value >> rshift_val, left.Location);
- Binary.Error_OperatorCannotBeApplied (ec, left, right, oper, loc);
- break;
+ return null;
case Binary.Operator.Equality:
if (TypeSpec.IsReferenceType (lt) && TypeSpec.IsReferenceType (rt) ||
return new BoolConstant (ec.BuiltinTypes, bool_res, left.Location);
}
-
+
return null;
}
}