2005-12-23 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / mcs / doc.cs
index e7c4b259a0d2f6b30f9ef5b6cbb0f34297cedbed..8f0d14fbce42aa7dc0b6a3a2be63be8d826aacae 100644 (file)
@@ -705,12 +705,6 @@ namespace Mono.CSharp {
                                return; // a type
                        }
 
-                       // don't use identifier here. System[] is not alloed.
-                       if (RootNamespace.Global.IsNamespace (name)) {
-                               xref.SetAttribute ("cref", "N:" + name);
-                               return; // a namespace
-                       }
-
                        int period = name.LastIndexOf ('.');
                        if (period > 0) {
                                string typeName = name.Substring (0, period);
@@ -749,6 +743,17 @@ namespace Mono.CSharp {
                                }
                        }
 
+                       // It still might be part of namespace name.
+                       Namespace ns = ds.NamespaceEntry.NS.GetNamespace (name, false);
+                       if (ns != null) {
+                               xref.SetAttribute ("cref", "N:" + ns.FullName);
+                               return; // a namespace
+                       }
+                       if (RootNamespace.Global.IsNamespace (name)) {
+                               xref.SetAttribute ("cref", "N:" + name);
+                               return; // a namespace
+                       }
+
                        Report.Warning (1574, 1, mc.Location, "XML comment on `{0}' has cref attribute `{1}' that could not be resolved",
                                mc.GetSignatureForError (), cref);