2002-09-11 Miguel de Icaza <miguel@ximian.com>
+ * driver.cs: Activate the using-error detector at warning level
+ 4 (at least for MS-compatible APIs).
+
+ * namespace.cs (VerifyUsing): Small buglett fix.
+
* pending.cs (PendingImplementation): pass the container pointer.
* interface.cs (GetMethods): Allow for recursive definition. Long
if (timestamps)
ShowTime ("Closing types");
-#if WORKS
- //
- // Currently this can not be commited unles 30020 is fixed
- //
- if (!Namespace.VerifyUsing ())
- return false;
-#endif
+ if (RootContext.WarningLevel >= 4)
+ if (!Namespace.VerifyUsing ())
+ return false;
RootContext.CloseTypes ();
int errors = 0;
foreach (Namespace ns in all_namespaces){
- foreach (UsingEntry ue in ns.UsingTable){
+ ArrayList uses = ns.UsingTable;
+ if (uses == null)
+ continue;
+
+ foreach (UsingEntry ue in uses){
if (ue.Used)
continue;
unused.Add (ue);
foreach (UsingEntry ue in unused){
if (namespaces.Contains (ue.Name)){
- Report.Warning (-24, ue.Location, "Unused namespace in `using' declaration");
+ Report.Warning (6024, ue.Location, "Unused namespace in `using' declaration");
continue;
}
errors++;
- Report.Error (246, ue.Location, "The namespace " + ue.Name +
- " can not be found (missing assembly reference?)");
+ Report.Error (246, ue.Location, "The namespace `" + ue.Name +
+ "' can not be found (missing assembly reference?)");
}
}