Author: martin
Date: 2005-03-22 05:20:50 -0500 (Tue, 22 Mar 2005)
New Revision: 42084
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/attribute.cs
trunk/mcs/gmcs/ecore.cs
trunk/mcs/gmcs/expression.cs
trunk/mcs/gmcs/namespace.cs
Log:
**** Merged r40973-r40980 from MCS ****
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-03-22 10:18:00 UTC (rev 42083)
+++ trunk/mcs/gmcs/ChangeLog 2005-03-22 10:20:50 UTC (rev 42084)
@@ -1,3 +1,26 @@
+2005-02-21 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * namespace.cs (UsingEntry.Resolve): Undo change below.
+
+2005-02-21 Raja R Harinath <[EMAIL PROTECTED]>
+
+ Fix #72756.
+ * ecore.cs (Expression.MemberLookupFailed): Add argument to
+ disable the error message when the extended MemberLookup also
+ fails.
+ (Expression.MemberLookupFinal): Update.
+ (SimpleName.DoSimpleNameResolve): Update.
+ * expression.cs (MemberAccess.ResolveNamespaceOrType):
+ Don't use MemberLookupFinal.
+ (New.DoResolve): Update.
+ (BaseAccess.CommonResolve): Update.
+
+2005-02-21 Raja R Harinath <[EMAIL PROTECTED]>
+
+ Fix #72732.
+ * attribute.cs (Attribute.ResolveType): If a 'resolve_error' had
+ occured previously, don't resolve again.
+
2005-02-21 Marek Safar <[EMAIL PROTECTED]>
Fix #69949
Modified: trunk/mcs/gmcs/attribute.cs
===================================================================
--- trunk/mcs/gmcs/attribute.cs 2005-03-22 10:18:00 UTC (rev 42083)
+++ trunk/mcs/gmcs/attribute.cs 2005-03-22 10:20:50 UTC (rev 42084)
@@ -234,7 +234,7 @@
public virtual Type ResolveType (EmitContext ec)
{
- if (Type == null)
+ if (Type == null && !resolve_error)
Type = CheckAttributeType (ec);
return Type;
}
Modified: trunk/mcs/gmcs/ecore.cs
===================================================================
--- trunk/mcs/gmcs/ecore.cs 2005-03-22 10:18:00 UTC (rev 42083)
+++ trunk/mcs/gmcs/ecore.cs 2005-03-22 10:20:50 UTC (rev 42084)
@@ -709,15 +709,15 @@
if (e == null && errors == Report.Errors)
// No errors were reported by MemberLookup, but
there was an error.
- MemberLookupFailed (ec, qualifier_type,
queried_type, name,
- null, loc);
+ MemberLookupFailed (ec, qualifier_type,
queried_type, name, null, true, loc);
return e;
}
public static void MemberLookupFailed (EmitContext ec, Type
qualifier_type,
Type queried_type,
string name,
- string class_name,
Location loc)
+ string class_name, bool
complain_if_none_found,
+ Location loc)
{
if (almostMatchedMembers.Count != 0) {
if (qualifier_type == null) {
@@ -765,6 +765,9 @@
BindingFlags.NonPublic, name, null);
if (mi == null) {
+ if (!complain_if_none_found)
+ return;
+
if (class_name != null)
Report.Error (103, loc, "The name `" +
name + "' could not be " +
"found in `" + class_name
+ "'");
@@ -2213,7 +2216,7 @@
almostMatchedMembers = almost_matched;
if (almost_matched_type == null)
almost_matched_type = ec.ContainerType;
- MemberLookupFailed (ec, null,
almost_matched_type, ((SimpleName) this).Name, ec.DeclSpace.Name, loc);
+ MemberLookupFailed (ec, null,
almost_matched_type, ((SimpleName) this).Name, ec.DeclSpace.Name, true, loc);
return null;
}
Modified: trunk/mcs/gmcs/expression.cs
===================================================================
--- trunk/mcs/gmcs/expression.cs 2005-03-22 10:18:00 UTC (rev 42083)
+++ trunk/mcs/gmcs/expression.cs 2005-03-22 10:20:50 UTC (rev 42084)
@@ -6039,7 +6039,7 @@
if (method == null) {
if (almostMatchedMembers.Count != 0) {
- MemberLookupFailed (ec, type, type,
".ctor", null, loc);
+ MemberLookupFailed (ec, type, type,
".ctor", null, true, loc);
return null;
}
@@ -7664,8 +7664,7 @@
ec, expr_type, expr_type, lookup_id,
loc);
}
if (member_lookup == null) {
- MemberLookupFailed (
- ec, expr_type, expr_type, Identifier,
null, loc);
+ MemberLookupFailed (ec, expr_type, expr_type,
Identifier, null, true, loc);
return null;
}
@@ -7767,11 +7766,14 @@
return null;
}
- Expression member_lookup;
- member_lookup = MemberLookupFinal (ec, expr_type,
expr_type, lookup_id, loc);
- if (!silent && member_lookup == null) {
- Report.Error (234, loc, "The type name `{0}'
could not be found in type `{1}'",
- Identifier, new_expr.FullName);
+ Expression member_lookup = MemberLookup (ec, expr_type,
expr_type, Identifier, loc);
+ if (member_lookup == null) {
+ int errors = Report.Errors;
+ MemberLookupFailed (ec, expr_type, expr_type,
Identifier, null, false, loc);
+
+ if (!silent && errors == Report.Errors)
+ Report.Error (234, loc, "The type name
`{0}' could not be found in type `{1}'",
+ Identifier,
new_expr.FullName);
return null;
}
@@ -8796,8 +8798,7 @@
member, AllMemberTypes,
AllBindingFlags,
loc);
if (member_lookup == null) {
- MemberLookupFailed (
- ec, base_type, base_type, member, null,
loc);
+ MemberLookupFailed (ec, base_type, base_type,
member, null, true, loc);
return null;
}
Modified: trunk/mcs/gmcs/namespace.cs
===================================================================
--- trunk/mcs/gmcs/namespace.cs 2005-03-22 10:18:00 UTC (rev 42083)
+++ trunk/mcs/gmcs/namespace.cs 2005-03-22 10:20:50 UTC (rev 42084)
@@ -248,10 +248,9 @@
return resolved as Namespace;
DeclSpace root = RootContext.Tree.Types;
- NamespaceEntry orig_ns = root.NamespaceEntry;
root.NamespaceEntry = NamespaceEntry;
resolved = Name.ResolveAsTypeStep
(root.EmitContext);
- root.NamespaceEntry = orig_ns;
+ root.NamespaceEntry = null;
return resolved as Namespace;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches