- Report.Warning (436, 2, loc, "Ignoring imported type `{0}' since the current assembly already has a declaration with the same name",
- TypeManager.CSharpName (t));
+ if (loc.IsNull) {
+ DeclSpace ds = TypeManager.LookupDeclSpace (t);
+ Report.Warning (1685, 1, ds.Location, "The type `{0}' conflicts with the predefined type `{1}' and will be ignored",
+ ds.GetSignatureForError (), TypeManager.CSharpName (found_type));
+ return found_type;
+ }
+ Report.SymbolRelatedToPreviousError (t);
+ Report.Warning (436, 2, loc, "The type `{0}' conflicts with the imported type `{1}'. Ignoring the imported type definition",
+ TypeManager.CSharpName (t), TypeManager.CSharpName (found_type));