[Mono-dev] Extern alias patch (latest modifications)
Raja R Harinath
rharinath at novell.com
Thu Oct 20 05:12:54 EDT 2005
Hi,
Carlos Alberto Cortez <calberto.cortez at gmail.com> writes:
> Hey, all the remainign issues are fixed now. All my tests are running
> fine and that repeated code has been refactored to report the remaining
> warnings in the same place.
>
> The patch is attached, and I'm not attaching the tests this time, since
> they remain the same.
Looks good to me. Some minor nits:
[snip]
> /// <summary>
> /// Computes the namespaces that we import from the assemblies we reference.
> /// </summary>
> public static void ComputeNamespaces ()
> {
> - MethodInfo assembly_get_namespaces = typeof (Assembly).GetMethod ("GetNamespaces", BindingFlags.Instance|BindingFlags.NonPublic);
> + foreach (Assembly assembly in assemblies)
> + GlobalRootNamespace.Global.AddAssemblyReference (assembly);
For some reason, I feel this is better spelled as RootNamespace.Global :-)
There's needless alliteration here. Very cosmetic, however.
> + public override string GetSignatureForError ()
> + {
> + return "::global";
> + }
I'd rather say 'global::' -- that's how it's used, after all.
> public override string ToString ()
> {
> - if (NS == Namespace.Root)
> - return "NamespaceEntry (<root>)";
> - else
> - return String.Format ("NamespaceEntry ({0},{1},{2})", ns.Name, IsImplicit, ID);
> + return ns.ToString ();
> }
> }
This seems to be dropping information. We need to print the details of
the NamespaceEntry too.
- Hari
More information about the Mono-devel-list
mailing list