Author: raja
Date: 2005-12-19 05:13:56 -0500 (Mon, 19 Dec 2005)
New Revision: 54596
Modified:
trunk/mcs/gmcs/
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/namespace.cs
Log:
** merged revision 54585 from mcs
Property changes on: trunk/mcs/gmcs
___________________________________________________________________
Name: gmcs
- Latest GMCS merging status:
- merged everything until r54529 (on 2005-12-16).
- not merging r49122, ie. we're keeping r48609 and r48610; see #75925.
- r37007 will never be merged; it's a mcs-only change.
- r43124 doesn't work in GMCS; not merged yet.
+ Latest GMCS merging status:
- merged everything until r54585 (on 2005-12-19).
- not merging r49122, ie. we're keeping r48609 and r48610; see #75925.
- r37007 will never be merged; it's a mcs-only change.
- r43124 doesn't work in GMCS; not merged yet.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2005-12-19 09:27:43 UTC (rev 54595)
+++ trunk/mcs/gmcs/ChangeLog 2005-12-19 10:13:56 UTC (rev 54596)
@@ -1,3 +1,17 @@
+2005-12-18 Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+ Fix #76995
+
+ * namespace.cs (NamespaceEntry): Add extern_aliases as a
+ ListDictionary, to contain the ExternAliasEntry entries (in
+ addition to the NamespaceEntry.aliases hashtable). This field is
+ shared between the original entry and its doppelganger (bodyless
+ copy of it).
+ (NamespaceEntry.UsingExternalAlias): Add the extern alias entry to
+ extern_aliases field.
+ (NamespaceEntry.Lookup): Move the IsImplicit check after the
+ lookup in extern_aliases.
+
2005-12-16 Raja R Harinath <[EMAIL PROTECTED]>
Fix #77006.
Modified: trunk/mcs/gmcs/namespace.cs
===================================================================
--- trunk/mcs/gmcs/namespace.cs 2005-12-19 09:27:43 UTC (rev 54595)
+++ trunk/mcs/gmcs/namespace.cs 2005-12-19 10:13:56 UTC (rev 54596)
@@ -421,6 +421,8 @@
public bool DeclarationFound = false;
bool UsingFound;
+ ListDictionary extern_aliases;
+
static ArrayList entries = new ArrayList ();
public static void Reset ()
@@ -679,6 +681,12 @@
if (aliases == null)
aliases = new Hashtable ();
+ // Share the extern_aliases field with the Doppelganger
+ if (extern_aliases == null) {
+ extern_aliases = new ListDictionary ();
+ Doppelganger.extern_aliases = extern_aliases;
+ }
+
if (aliases.Contains (name)) {
AliasEntry ae = (AliasEntry) aliases [name];
Report.SymbolRelatedToPreviousError
(ae.Location, ae.Name);
@@ -692,7 +700,11 @@
return;
}
- aliases [name] = new ExternAliasEntry (Doppelganger,
name, loc);
+ // Register the alias in aliases and extern_aliases,
since we need both of them
+ // to keep things simple (different resolution
scenarios)
+ ExternAliasEntry alias = new ExternAliasEntry
(Doppelganger, name, loc);
+ aliases [name] = alias;
+ extern_aliases [name] = alias;
}
public FullNamedExpression LookupNamespaceOrType (DeclSpace ds,
string name, Location loc, bool ignore_cs0104)
@@ -737,11 +749,17 @@
if (fne != null)
return fne;
+ if (extern_aliases != null) {
+ AliasEntry entry = extern_aliases [name] as
AliasEntry;
+ if (entry != null)
+ return entry.Resolve ();
+ }
+
if (IsImplicit)
return null;
-
+
//
- // Check aliases.
+ // Check aliases.
//
if (aliases != null) {
AliasEntry entry = aliases [name] as AliasEntry;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches