//
public static EmitContext ConstantEC = null;
- static void Error_CannotConvertType (Location loc, Type source, Type target)
+ static public void Error_CannotConvertType (Location loc, Type source, Type target)
{
Report.Error (30, loc, "Cannot convert type '" +
TypeManager.CSharpName (source) + "' to '" +
if (TypeManager.IsValueType (expr_type))
return new BoxedCast (expr);
if (expr_type.IsClass || expr_type.IsInterface || expr_type == TypeManager.enum_type){
- if (target_type == TypeManager.anonymous_method_type)
+ if (expr_type == TypeManager.anonymous_method_type)
return null;
return new EmptyCast (expr, target_type);
}
static public void Error_CannotImplicitConversion (Location loc, Type source, Type target)
{
+ if (source.Name == target.Name){
+ Report.ExtraInformation (loc,
+ String.Format (
+ "The type {0} has two conflicting definitons, one comes from {0} and the other from {1}",
+ source.Assembly.FullName, target.Assembly.FullName));
+
+ }
Report.Error (29, loc, "Cannot convert implicitly from {0} to `{1}'",
source == TypeManager.anonymous_method_type ?
"anonymous method" : "`" + TypeManager.CSharpName (source) + "'",