2005-01-19 Sureshkumar T <tsureshkumar@novell.com>
[mono.git] / mcs / gmcs / convert.cs
index 8caac767bdb38f8ad925ff323bfca0d61517f436..e6bdf4674c0c7a0c35c58e5000ac1e8785e4e066 100644 (file)
@@ -29,7 +29,7 @@ namespace Mono.CSharp {
                //
                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 '" +
@@ -1344,6 +1344,13 @@ namespace Mono.CSharp {
 
                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) + "'",